Productivity
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: public interface IFoo { int Value { get; set; } } Now, we can create a mock that will throw on any call other than the one expected, generally its a strict mock and we can do it like: bool expected = false; var foo = Mock.Create<IFoo>(BehaviorMode.Strict); Mock.ArrangeSet(() => { foo.Value = 1; }).DoInstead(() => expected = true); foo.Value = 1; Assert.True(expected); Here , the method for running though our expectation for set is Mock.ArrangeSet , where we can directly set our expectations or can even set matchers into...