Example #1
0
        ITestMatcher ITestMatcherFactory.CreateMatcher(TestContext testContext)
        {
            var flags = RecordExceptionFlags.UnwindTargetExceptions;

            if (testContext.ShouldVerify)
            {
                flags |= RecordExceptionFlags.StrictVerification;
            }
            return(Matchers.Throw(ExceptionType).WithFlags(flags));
        }
Example #2
0
 public void DoesNotThrow(Action action, string message, params object[] args)
 {
     NotThat(action, Matchers.Throw(), message, args);
 }
Example #3
0
 public void DoesNotThrow(Action action)
 {
     NotThat(action, Matchers.Throw());
 }
Example #4
0
 public static void Exception(this IExceptionExpectation e, string message, params object[] args)
 {
     e.Like(Matchers.Throw(), message, (object[])args);
 }
Example #5
0
 public static void Exception <TException>(this IExceptionExpectation e, string message, params object[] args) where TException : Exception
 {
     e.Like(Matchers.Throw <TException>(), message, (object[])args);
 }
Example #6
0
 public void Throws(Type exceptionType, Action action, string message, params object[] args)
 {
     That(action, Matchers.Throw(exceptionType), message, args);
 }
Example #7
0
 public void Throws(Type exceptionType, Action action)
 {
     That(action, Matchers.Throw(exceptionType));
 }
Example #8
0
 public void DoesNotThrow(Type exceptionType, Action action)
 {
     NotThat(action, Matchers.Throw(exceptionType));
 }