c# - Is there something akin to SetupGetSequence in Moq -
in moq, know there setupsequence setting sequential usage of function , there setupget setting value property.
however need set property in sequential way.
is there way setting sequential in moq?
note: did not write interface or service mocking, therefore cannot change it.
sequencing return values setupsequence works property getters :
mock.setupsequence(m => m.propertyname).returns(1).returns(2).returns(3); note: can use setup instead of setupget, because moq checks whether body of given lambda expression property , calls setupget internally [source code]. benefit have skipping internal check.
Comments
Post a Comment