Show / Hide Table of Contents

Class EqualException

Exception thrown when two values are unexpectedly not equal.

Inheritance
Object
XunitException
AssertActualExpectedException
EqualException
Inherited Members
AssertActualExpectedException.Actual
AssertActualExpectedException.ActualTitle
AssertActualExpectedException.Expected
AssertActualExpectedException.ExpectedTitle
XunitException.StackTrace
XunitException.UserMessage
XunitException.ToString()
Namespace: Xunit.Sdk
Assembly: xunit.assert.dll
Syntax
public class EqualException : AssertActualExpectedException

Constructors

| Improve this Doc View Source

EqualException(Object, Object)

Creates a new instance of the EqualException class.

Declaration
public EqualException(object expected, object actual)
Parameters
Type Name Description
Object expected

The expected object value

Object actual

The actual object value

| Improve this Doc View Source

EqualException(String, String, Int32, Int32)

Creates a new instance of the EqualException class for string comparisons.

Declaration
public EqualException(string expected, string actual, int expectedIndex, int actualIndex)
Parameters
Type Name Description
String expected

The expected string value

String actual

The actual string value

Int32 expectedIndex

The first index in the expected string where the strings differ

Int32 actualIndex

The first index in the actual string where the strings differ

Properties

| Improve this Doc View Source

ActualIndex

Gets the index into the actual value where the values first differed. Returns -1 if the difference index points were not provided.

Declaration
public int ActualIndex { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

ExpectedIndex

Gets the index into the expected value where the values first differed. Returns -1 if the difference index points were not provided.

Declaration
public int ExpectedIndex { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Message

Declaration
public override string Message { get; }
Property Value
Type Description
String
Overrides
AssertActualExpectedException.Message
  • Improve this Doc
  • View Source
Back to top Generated by DocFX