AssertEx.

IsExceptionWithMessage<T>(Exception, string) Method

Summary

Verifies that the exception is of the specified type with the specified message.
Namespace
Xunit
Containing Type
AssertEx

Syntax

public static void IsExceptionWithMessage<T>(Exception exception, string message) 
    where T : Exception

Type Parameters

Name Description
T The expected exception type.

Parameters

Name Type Description
exception Exception The exception to verify.
message string The expected message.

Return Value

Type Description
void