Mocking successive calls of similar type via sequential mocking
Posted by: Mehfuzs WebLog,
on 31 May 2010 |
View original | Bookmarked: 0 time(s)
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 lets first consider the following dummy database and entity class. public class Person { public virtual string Name { get; set; } public virtual int Age { get; set; } } public interface IDataBase { T Get<T>(); } Now, our test goal is to return different entity for successive calls on IDataBase.Get<T>()....