public static Exception ShouldThrow(this Func <Task> actual, TimeSpan timeoutAfter, [InstantHandle] Func <string> customMessage, Type exceptionType) { return(Should.ThrowInternal(actual, timeoutAfter, customMessage, exceptionType)); }
public static Exception ShouldThrow(this Func <object?> actual, [InstantHandle] Func <string?>?customMessage, Type exceptionType) { return(Should.ThrowInternal(actual, customMessage, exceptionType)); }
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)); }
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)); }