ExpectedExceptionAttribute Constructors

Definition

Overloads

ExpectedExceptionAttribute(Type)

Initializes a new instance of the ExpectedExceptionAttribute class with the expected type.

ExpectedExceptionAttribute(Type, String)

Initializes a new instance of the ExpectedExceptionAttribute class with the expected type and the message to include when no exception is thrown by the test.

ExpectedExceptionAttribute(Type)

Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs

Initializes a new instance of the ExpectedExceptionAttribute class with the expected type.

C++
public:
 ExpectedExceptionAttribute(Type ^ exceptionType);

Parameters

exceptionType
Type

Type of the expected exception.

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2017, 2019, 2022

ExpectedExceptionAttribute(Type, String)

Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs
Source:
ExpectedExceptionAttribute.cs

Initializes a new instance of the ExpectedExceptionAttribute class with the expected type and the message to include when no exception is thrown by the test.

C++
public:
 ExpectedExceptionAttribute(Type ^ exceptionType, System::String ^ noExceptionMessage);

Parameters

exceptionType
Type

Type of the expected exception.

noExceptionMessage
String

Message to include in the test result if the test fails due to not throwing an exception.

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2017, 2019, 2022