Show / Hide Table of Contents

Class AssertActualExpectedException

Base class for exceptions that have actual and expected values

Inheritance
Object
XunitException
AssertActualExpectedException
ContainsException
DoesNotContainException
EqualException
FalseException
IsAssignableFromException
IsNotTypeException
IsTypeException
NotEqualException
NullException
ProperSubsetException
ProperSupersetException
SameException
SubsetException
SupersetException
ThrowsException
TrueException
Inherited Members
XunitException.StackTrace
XunitException.UserMessage
XunitException.ToString()
Namespace: Xunit.Sdk
Assembly: xunit.assert.dll
Syntax
public class AssertActualExpectedException : XunitException

Constructors

| Improve this Doc View Source

AssertActualExpectedException(Object, Object, String, String, String)

Creates a new instance of the AssertActualExpectedException class.

Declaration
public AssertActualExpectedException(object expected, object actual, string userMessage, string expectedTitle = null, string actualTitle = null)
Parameters
Type Name Description
Object expected

The expected value

Object actual

The actual value

String userMessage

The user message to be shown

String expectedTitle

The title to use for the expected value (defaults to "Expected")

String actualTitle

The title to use for the actual value (defaults to "Actual")

| Improve this Doc View Source

AssertActualExpectedException(Object, Object, String, String, String, Exception)

Creates a new instance of the AssertActualExpectedException class.

Declaration
public AssertActualExpectedException(object expected, object actual, string userMessage, string expectedTitle, string actualTitle, Exception innerException)
Parameters
Type Name Description
Object expected

The expected value

Object actual

The actual value

String userMessage

The user message to be shown

String expectedTitle

The title to use for the expected value (defaults to "Expected")

String actualTitle

The title to use for the actual value (defaults to "Actual")

Exception innerException

The inner exception.

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

ActualTitle

Gets the title used for the actual value.

Declaration
public string ActualTitle { 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

ExpectedTitle

Gets the title used for the expected value.

Declaration
public string ExpectedTitle { 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
Back to top Generated by DocFX