Ejemplo n.º 1
0
        public static void RecordedCallHasReturnValue(
            IFoo fake,
            object returnValue,
            ICompletedFakeObjectCall recordedCall)
        {
            "Given a fake"
            .x(() => fake = A.Fake <IFoo>());

            "When I call a method on the fake"
            .x(() => returnValue = fake.AMethodReturningAnObject());

            "And I retrieve the call from the recorded calls"
            .x(() => recordedCall = Fake.GetCalls(fake).Single());

            "Then the recorded call's return value should be the value that was actually returned"
            .x(() => recordedCall.ReturnValue.Should().Be(returnValue));
        }