How to use FakeItEasy to assert a method was not called
问题 I want to assert that nothing was dispatched , a.k.a. _dispatcher.Dispatch was not called . interface being faked/mocked: interface IDispatcher { void Dispatch<T>(T command, Stuff stuff = null, TimeSpan? timeout = null, int? retries = null) where T : Command; } In the test body: _dispatcher = A.Fake<IDispatcher>(); // do stuff A.CallTo(() => _dispatcher.Dispatch(A<Command>.Ignored, A<Stuff>.Ignored, A<TimeSpan?>.Ignored, A<int?>.Ignored)).MustNotHaveHappened(); This test passes when something