示例#1
0
        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);
            }
        }
示例#2
0
 public void Verify()
 {
     if (VerifiesUponInvocation())
     {
         if (!ReceivedExpectedNumberOfInvocations)
         {
             CheckTooManyInvocations();
             throw SequenceVerifyException.InsufficientCallsException(verifyCurrentInvocationLoop + 1, verifyCurrentInvocationExpectedInvocationIndex);
         }
     }
     else
     {
         VerifyAllInvocationIndices();
     }
 }