public void SetUp()
 {
     Sample = Substitute.For <ISample>();
     ConfigureContext();
     try
     {
         ExpectedCall();
     }
     catch (ReceivedCallsException ex)
     {
         _exception = ex;
     }
 }
예제 #2
0
 public override void Because()
 {
     try
     {
         _requiredQuantity = Quantity.AtLeastOne();
         sut.Throw(_callSpecification, _actualCalls, _relatedCalls, _requiredQuantity);
     }
     catch (ReceivedCallsException ex)
     {
         _exception = ex;
         return;
     }
     throw new AssertionException("Expected a matching exception to be thrown.");
 }