コード例 #1
0
ファイル: StubTests.cs プロジェクト: virgiliofornazin/NDepth
        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();
        }