Assert the order of expected calls over instances
Posted by: Mehfuzs WebLog,
on 27 Jan 2012 |
View original | Bookmarked: 0 time(s)
How you assert through unit test that an user is authenticated before doing withdraw operation? You can surely verify a method is invoked as expected but if you want to ensure the order right then you might require a little more. JustMock lets you specify the order in which your setups should be executed. This helps you identify the exact way in which a particular logic is implemented. To begin, lets consider the following context: User wants to withdraw money from his account. Withdraw operation...