public void Add(int callIndex)
 {
     if (callIndex < 0)
     {
         throw SequenceSetupException.NegativeCallIndexException(callIndex);
     }
     if (callIndices.IndexOf(callIndex) != -1)
     {
         throw SequenceSetupException.RepeatedCallIndexInSetupException(callIndex);
     }
     callIndices.Add(callIndex);
 }
Exemple #2
0
 private void AddExpectedInvocations(IInvocable setUp)
 {
     foreach (var sequenceInvocationIndex in setUp.SequenceInvocationIndices)
     {
         try
         {
             expectedInvocations.Add(sequenceInvocationIndex, setUp);
         }
         catch (ArgumentException)
         {
             throw SequenceSetupException.RepeatedCallIndexAcrossSetupsException(sequenceInvocationIndex);
         }
     }
 }
Exemple #3
0
 private void SetIsInvocationIndices(bool isInvocationIndices)
 {
     if (hasSetSequenceType)
     {
         if (this.isInvocationIndices != isInvocationIndices)
         {
             throw SequenceSetupException.MixedTimesAndCallIndicesException();
         }
     }
     else
     {
         this.isInvocationIndices = isInvocationIndices;
         hasSetSequenceType       = true;
     }
 }