示例#1
0
        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>());
        }