コード例 #1
0
ファイル: StubTests.cs プロジェクト: virgiliofornazin/NDepth
        public void YouCanClearReceivedCalls()
        {
            // Create a stub.
            ISampleClass stub = CreateStub();

            // Call some method.
            stub.MethodThatReturnsInteger("foo");

            // Check that method was called.
            stub.Received().MethodThatReturnsInteger("foo");

            stub.ClearReceivedCalls();

            // Check that method was not called.
            stub.DidNotReceiveWithAnyArgs().MethodThatReturnsInteger(Arg.Any <string>());
        }