<PackageReference Include="nunit" Version="2.5.10.11092" />

ExpectedExceptionAttribute

ExpectedExceptionAttribute
public Type ExpectedException { get; set; }

Gets or sets the expected exception type

public string ExpectedExceptionName { get; set; }

Gets or sets the full Type name of the expected exception

public string ExpectedMessage { get; set; }

Gets or sets the expected message text

public string Handler { get; set; }

Gets the name of a method to be used as an exception handler

public MessageMatch MatchType { get; set; }

Gets or sets the type of match to be performed on the expected message

public string UserMessage { get; set; }

Gets or sets the user message displayed in case of failure

Constructor for a non-specific exception

public ExpectedExceptionAttribute(Type exceptionType)

Constructor for a given type of exception

public ExpectedExceptionAttribute(string exceptionName)

Constructor for a given exception name