Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
 public static Exception ShouldThrow(this Func <object?> actual, [InstantHandle] Func <string?>?customMessage, Type exceptionType)
 {
     return(Should.ThrowInternal(actual, customMessage, exceptionType));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 4
0
 public static TException ShouldThrow <TException>(this Func <object?> actual, [InstantHandle] Func <string?>?customMessage) where TException : Exception
 {
     return(Should.ThrowInternal <TException>(actual, customMessage));
 }
Ejemplo n.º 5
0
 /*** ShouldThrow(Func<T>) ***/
 public static Exception ShouldThrow(this Func <object?> actual, Type exceptionType)
 {
     return(Should.ThrowInternal(actual, null, exceptionType));
 }
Ejemplo n.º 6
0
 public static Exception ShouldThrow(this Action actual, string?customMessage, Type exceptionType)
 {
     return(Should.ThrowInternal(actual, customMessage, exceptionType));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 8
0
 /*** ShouldThrow(Func<T>) ***/
 public static Exception ShouldThrow(this Func <object?> actual, Type exceptionType, string?customMessage = null)
 {
     return(Should.ThrowInternal(actual, customMessage, exceptionType));
 }