コード例 #1
0
 public static Exception ShouldThrow(this Func <Task> actual, TimeSpan timeoutAfter, [InstantHandle] Func <string> customMessage, Type exceptionType)
 {
     return(Should.ThrowInternal(actual, timeoutAfter, customMessage, exceptionType));
 }
コード例 #2
0
 public static Exception ShouldThrow(this Func <object?> actual, [InstantHandle] Func <string?>?customMessage, Type exceptionType)
 {
     return(Should.ThrowInternal(actual, customMessage, exceptionType));
 }
コード例 #3
0
 public static TException ShouldThrow <TException>(this Func <Task> actual, TimeSpan timeoutAfter, [InstantHandle] Func <string> customMessage) where TException : Exception
 {
     return(Should.ThrowInternal <TException>(actual, timeoutAfter, customMessage));
 }
コード例 #4
0
 public static TException ShouldThrow <TException>(this Func <object?> actual, [InstantHandle] Func <string?>?customMessage) where TException : Exception
 {
     return(Should.ThrowInternal <TException>(actual, customMessage));
 }
コード例 #5
0
 /*** ShouldThrow(Func<T>) ***/
 public static Exception ShouldThrow(this Func <object?> actual, Type exceptionType)
 {
     return(Should.ThrowInternal(actual, null, exceptionType));
 }
コード例 #6
0
 public static Exception ShouldThrow(this Action actual, string?customMessage, Type exceptionType)
 {
     return(Should.ThrowInternal(actual, customMessage, exceptionType));
 }
コード例 #7
0
 /*** ShouldThrow(Func<T>) ***/
 public static TException ShouldThrow <TException>(this Func <object?> actual, string?customMessage = null) where TException : Exception
 {
     return(Should.ThrowInternal <TException>(actual, customMessage));
 }
コード例 #8
0
 /*** ShouldThrow(Func<T>) ***/
 public static Exception ShouldThrow(this Func <object?> actual, Type exceptionType, string?customMessage = null)
 {
     return(Should.ThrowInternal(actual, customMessage, exceptionType));
 }