public void FailToMeetOrderedChildScopeWrongToFewNumberOfInvocations() { using (expectationScope.BeginOrdered()) { AddExpectation(Expectation.ShouldMeetAtLeast(2, invocation1)); AddExpectation(Expectation.ShouldMeetAtLeastOnce(invocation2)); } TryMeetSucceeds(invocation1); TryMeetFails(invocation2); }
public void MeetOrderedChildScope() { using (expectationScope.BeginOrdered()) { AddExpectation(Expectation.ShouldMeetAtMost(1, invocation1)); AddExpectation(Expectation.ShouldMeetAtLeast(2, invocation2)); AddExpectation(Expectation.ShouldMeetAtMost(3, invocation3)); } TryMeetSucceeds(invocation1); TryMeetSucceeds(invocation2); TryMeetSucceeds(invocation2); TryMeetSucceeds(invocation2); TryMeetSucceeds(invocation3); TryMeetSucceeds(invocation3); TryMeetSucceeds(invocation3); AssertHasBeenMet(); }