示例#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));
 }
 /*** ShouldThrow(Func<T>) ***/
 public static Exception ShouldThrow(this Func <object?> actual, Type exceptionType)
 {
     return(Should.ThrowInternal(actual, null, exceptionType));
 }
 public static Exception ShouldThrow(this Action actual, string?customMessage, Type exceptionType)
 {
     return(Should.ThrowInternal(actual, customMessage, exceptionType));
 }
 /*** ShouldThrow(Func<T>) ***/
 public static TException ShouldThrow <TException>(this Func <object?> actual, string?customMessage = null) where TException : Exception
 {
     return(Should.ThrowInternal <TException>(actual, customMessage));
 }
 /*** ShouldThrow(Func<T>) ***/
 public static Exception ShouldThrow(this Func <object?> actual, Type exceptionType, string?customMessage = null)
 {
     return(Should.ThrowInternal(actual, customMessage, exceptionType));
 }