Class AssertActualExpectedException
Base class for exceptions that have actual and expected values
Inheritance
Namespace: Xunit.Sdk
Assembly: xunit.assert.dll
Syntax
public class AssertActualExpectedException : XunitException
Constructors
| Improve this Doc View SourceAssertActualExpectedException(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") |
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 SourceActual
Gets the actual value.
Declaration
public string Actual { get; }
Property Value
Type | Description |
---|---|
String |
ActualTitle
Gets the title used for the actual value.
Declaration
public string ActualTitle { get; }
Property Value
Type | Description |
---|---|
String |
Expected
Gets the expected value.
Declaration
public string Expected { get; }
Property Value
Type | Description |
---|---|
String |
ExpectedTitle
Gets the title used for the expected value.
Declaration
public string ExpectedTitle { get; }
Property Value
Type | Description |
---|---|
String |
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(""). |