コード例 #1
0
ファイル: ThrowsMatcher.cs プロジェクト: Carbonfrost/f-spec
        ITestMatcher ITestMatcherFactory.CreateMatcher(TestContext testContext)
        {
            var flags = RecordExceptionFlags.UnwindTargetExceptions;

            if (testContext.ShouldVerify)
            {
                flags |= RecordExceptionFlags.StrictVerification;
            }
            return(Matchers.Throw(ExceptionType).WithFlags(flags));
        }
コード例 #2
0
ファイル: ThrowsMatcher.cs プロジェクト: Carbonfrost/f-spec
 public void DoesNotThrow(Action action, string message, params object[] args)
 {
     NotThat(action, Matchers.Throw(), message, args);
 }
コード例 #3
0
ファイル: ThrowsMatcher.cs プロジェクト: Carbonfrost/f-spec
 public void DoesNotThrow(Action action)
 {
     NotThat(action, Matchers.Throw());
 }
コード例 #4
0
ファイル: ThrowsMatcher.cs プロジェクト: Carbonfrost/f-spec
 public static void Exception(this IExceptionExpectation e, string message, params object[] args)
 {
     e.Like(Matchers.Throw(), message, (object[])args);
 }
コード例 #5
0
ファイル: ThrowsMatcher.cs プロジェクト: Carbonfrost/f-spec
 public static void Exception <TException>(this IExceptionExpectation e, string message, params object[] args) where TException : Exception
 {
     e.Like(Matchers.Throw <TException>(), message, (object[])args);
 }
コード例 #6
0
ファイル: ThrowsMatcher.cs プロジェクト: Carbonfrost/f-spec
 public void Throws(Type exceptionType, Action action, string message, params object[] args)
 {
     That(action, Matchers.Throw(exceptionType), message, args);
 }
コード例 #7
0
ファイル: ThrowsMatcher.cs プロジェクト: Carbonfrost/f-spec
 public void Throws(Type exceptionType, Action action)
 {
     That(action, Matchers.Throw(exceptionType));
 }
コード例 #8
0
ファイル: ThrowsMatcher.cs プロジェクト: Carbonfrost/f-spec
 public void DoesNotThrow(Type exceptionType, Action action)
 {
     NotThat(action, Matchers.Throw(exceptionType));
 }