I am new to mocking and started looking at JustMock. But I can't seem to figure out how I can verify the order of method calls.
For an example to assert that OnStart() was called exactly once before OnStop() was called exactly once on my mock object.
Is this possible?
Sincerely, Peter
2 Answers, 1 is accepted
0
Accepted
Ricky
Telerik team
answered on 18 May 2011, 02:32 PM
Hi Peter,
Thanks again for bringing up the question. However if want to know the order in which methods are executed, currently you can achieve this only by using the DoInstead modifier. Like in the following way:
In addition, we are also planning to provide a handy way of doing it during Mock.Assert() and hopefully it will be ready by next release.
Finally, please feel free to write us back for any further questions or issues.
Kind Regards,
Ricky
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
I was hoping there was a built-in way to do this in a simpler manner, but this approach will work for now. Looking forward to a built-in feature providing this through Mock.Assert in the future.