Show / Hide Table of Contents

Class RaisesException

Exception thrown when code unexpectedly fails to raise an event.

Inheritance
Object
XunitException
RaisesException
Inherited Members
XunitException.UserMessage
XunitException.ToString()
Namespace: Xunit.Sdk
Assembly: xunit.assert.dll
Syntax
public class RaisesException : XunitException

Constructors

| Improve this Doc View Source

RaisesException(Type)

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

Declaration
public RaisesException(Type expected)
Parameters
Type Name Description
Type expected

The type of the event args that was expected

| Improve this Doc View Source

RaisesException(Type, Type)

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

Declaration
public RaisesException(Type expected, Type actual)
Parameters
Type Name Description
Type expected
Type actual

Properties

| Improve this Doc View Source

Actual

Gets the actual value.

Declaration
public string Actual { get; }
Property Value
Type Description
String
| Improve this Doc View Source

Expected

Gets the expected value.

Declaration
public string Expected { get; }
Property Value
Type Description
String
| Improve this Doc View Source

Message

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

Declaration
public override string Message { get; }
Property Value
Type Description
String

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

| Improve this Doc View Source

StackTrace

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

Declaration
public override string StackTrace { get; }
Property Value
Type Description
String

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

Overrides
XunitException.StackTrace
  • Improve this Doc
  • View Source
Back to top Generated by DocFX