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 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>()....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.