public void YouCanCheckToSeeIfAMethodWasNotCalled() { // Create a stub. ISampleClass stub = CreateStub(); // Call some method. stub.MethodThatReturnsInteger("foo"); // Check that other methods were not called. stub.DidNotReceive().MethodThatReturnsInteger("asdfdsf"); stub.DidNotReceiveWithAnyArgs().MethodThatReturnsObject(Arg.Any <int>()); stub.DidNotReceive().VoidMethod(); }