Archives
-
Mocking successive calls of similar type via sequential mocking
In this post , i show how you can benefit from sequential mocking feature[In JustMock] for setting up expectations with successive calls of same type. To start let’s first consider the following dummy database and entity class.
-
Is your test method self-validating ?
Writing state of art unit tests that can validate your every part of the framework is challenging and interesting at the same time, its like becoming a samurai. One of the key concept in this is to keep our test synced all the time as underlying code changes and thus breaking them to the furthest unit as possible. This also means, we should avoid multiple conditions embedded in a single test.
-
Mocking property sets
In this post, i will be showing how you can mock property sets with your expected values or even action using JustMock. To begin, we have a sample interface: