public void Should_cache_the_message_convention() { var timesCalled = 0; conventions = new Conventions { IsCommandTypeAction = t => { timesCalled++; return false; } }; conventions.IsCommandType(GetType()); Assert.AreEqual(1, timesCalled); conventions.IsCommandType(GetType()); Assert.AreEqual(1, timesCalled); }
public void Should_cache_the_message_convention() { var timesCalled = 0; conventions = new Conventions { IsCommandTypeAction = t => { timesCalled++; return(false); } }; conventions.IsCommandType(GetType()); Assert.AreEqual(1, timesCalled); conventions.IsCommandType(GetType()); Assert.AreEqual(1, timesCalled); }