Class EqualException
Exception thrown when two values are unexpectedly not equal.
Inherited Members
Namespace: Xunit.Sdk
Assembly: xunit.assert.dll
Syntax
public class EqualException : AssertActualExpectedException
Constructors
| Improve this Doc View SourceEqualException(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 |
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 SourceActualIndex
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 |
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 |
Message
Declaration
public override string Message { get; }
Property Value
Type | Description |
---|---|
String |