xUnit.net
Public Member Functions | Properties | List of all members
Xunit.Sdk.RaisesException Class Reference

Exception thrown when code unexpectedly fails to raise an event. More...

Inheritance diagram for Xunit.Sdk.RaisesException:
Xunit.Sdk.XunitException

Public Member Functions

 RaisesException (Type expected)
 Creates a new instance of the RaisesException class. Call this constructor when no event was raised. More...
 
 RaisesException (Type expected, Type actual)
 Creates a new instance of the RaisesException class. Call this constructor when an More...
 
- Public Member Functions inherited from Xunit.Sdk.XunitException
 XunitException ()
 Initializes a new instance of the XunitException class. More...
 
 XunitException (string userMessage)
 Initializes a new instance of the XunitException class. More...
 
override string ToString ()
 

Properties

string Actual [get]
 Gets the actual value. More...
 
string Expected [get]
 Gets the expected value. More...
 
override string???? Message [get]
 Gets a message that describes the current exception. Includes the expected and actual values. More...
 
override string?? StackTrace [get]
 Gets a string representation of the frames on the call stack at the time the current exception was thrown. More...
 
- Properties inherited from Xunit.Sdk.XunitException
override string?? StackTrace [get]
 Gets a string representation of the frames on the call stack at the time the current exception was thrown. More...
 
string UserMessage [get, protected set]
 Gets the user message More...
 

Additional Inherited Members

- Protected Member Functions inherited from Xunit.Sdk.XunitException
 XunitException (string userMessage, Exception innerException)
 Initializes a new instance of the XunitException class. More...
 
 XunitException (string userMessage, string stackTrace)
 Initializes a new instance of the XunitException class. More...
 

Detailed Description

Exception thrown when code unexpectedly fails to raise an event.

Constructor & Destructor Documentation

◆ RaisesException() [1/2]

Xunit.Sdk.RaisesException.RaisesException ( Type  expected)
inline

Creates a new instance of the RaisesException class. Call this constructor when no event was raised.

Parameters
expectedThe type of the event args that was expected

◆ RaisesException() [2/2]

Xunit.Sdk.RaisesException.RaisesException ( Type  expected,
Type  actual 
)
inline

Creates a new instance of the RaisesException class. Call this constructor when an

Parameters
expected
actual

Property Documentation

◆ Actual

string Xunit.Sdk.RaisesException.Actual
get

Gets the actual value.

◆ Expected

string Xunit.Sdk.RaisesException.Expected
get

Gets the expected value.

◆ Message

override string???? Xunit.Sdk.RaisesException.Message
get

Gets a message that describes the current exception. Includes the expected and actual values.

Returns
The error message that explains the reason for the exception, or an empty string("").

<filterpriority>1</filterpriority>

◆ StackTrace

override string?? Xunit.Sdk.RaisesException.StackTrace
get

Gets a string representation of the frames on the call stack at the time the current exception was thrown.

Returns
A string that describes the contents of the call stack, with the most recent method call appearing first.

The documentation for this class was generated from the following file: