private IInvocable GetInvocation(int loop, int expectedInvocation) { var expectedNumberOfInvocations = expectedInvocations.Count; var invocationNumber = loop * expectedNumberOfInvocations + expectedInvocation; try { return(Invocations[invocationNumber]); } catch (ArgumentException) { throw SequenceVerifyException.InsufficientCallsException(loop + 1, expectedInvocation); } }
public void Verify() { if (VerifiesUponInvocation()) { if (!ReceivedExpectedNumberOfInvocations) { CheckTooManyInvocations(); throw SequenceVerifyException.InsufficientCallsException(verifyCurrentInvocationLoop + 1, verifyCurrentInvocationExpectedInvocationIndex); } } else { VerifyAllInvocationIndices(); } }