Exemplo n.º 1
0
 public void Verify(params Action[] actions)
 {
     try
     {
         var testStepCreators = new ITestStepCreator[] { new WithTestStep(), new WhenTestStep(), new ExpectTestStep(), new ShouldTestStep(), new DefaultTestStep() };
         var steps = actions.Select(x => TestStepCreator(testStepCreators, x)).ToList();
         Verify(steps, _exceptionConfiguration);
     }
     catch (Exception e)
     {
         Exception result = null;
         bool succeeded = true;
         try
         {
             result = new ExceptionRewriter().RewriteStacktrace(e);
         }
         catch
         {
             succeeded = false;
         }
         if (!succeeded)
         {
             throw;
         }
         throw result;
     }
 }
 public void Verify(params Action[] actions)
 {
     try
     {
         var testStepCreators = new ITestStepCreator[] { new WithTestStep(), new WhenTestStep(), new ExpectTestStep(), new ShouldTestStep(), new DefaultTestStep() };
         var steps            = actions.Select(x => TestStepCreator(testStepCreators, x)).ToList();
         Verify(steps, _exceptionConfiguration);
     }
     catch (Exception e)
     {
         Exception result    = null;
         bool      succeeded = true;
         try
         {
             result = new ExceptionRewriter().RewriteStacktrace(e);
         }
         catch
         {
             succeeded = false;
         }
         if (!succeeded)
         {
             throw;
         }
         throw result;
     }
 }
Exemplo n.º 3
0
 public void Verify(params Action[] actions)
 {
     try
     {
         var testStepCreators = new ITestStepCreator[] { new WithTestStep(), new WhenTestStep(), new ExpectTestStep(), new ShouldTestStep(), new DefaultTestStep() };
         var steps            = actions.Select(x => TestStepCreator(testStepCreators, x)).ToList();
         Verify(steps, _exceptionConfiguration);
     }
     catch (Exception e)
     {
         throw new AssertionException(e);
     }
 }
Exemplo n.º 4
0
 public void Verify(params Action[] actions)
 {
     try
     {
         var testStepCreators = new ITestStepCreator[] { new WithTestStep(), new WhenTestStep(), new ExpectTestStep(), new ShouldTestStep(), new DefaultTestStep() };
         var steps = actions.Select(x => TestStepCreator(testStepCreators, x)).ToList();
         Verify(steps, _exceptionConfiguration);
     }
     catch (Exception e)
     {
         throw new AssertionException(e);
     }
 }