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

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

            // Check that particular method was called.
            stub.Received().MethodThatReturnsInteger("foo");
            stub.ReceivedWithAnyArgs().MethodThatReturnsInteger(Arg.Any <string>());
        }