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

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -