Class AssertEqualityResult
- Namespace
- Xunit.Sdk
- Assembly
- xunit.v3.assert.dll
Indicates the result of comparing two values for equality. Includes success/failure information, as well as indices where the values differ, if the values are indexed (e.g., collections or strings).
public class AssertEqualityResult : IEquatable<AssertEqualityResult>
- Inheritance
-
AssertEqualityResult
- Implements
- Inherited Members
Properties
- Equal
Returns
trueif the values were equal;false, otherwise.
- Exception
Returns the exception that caused the failure, if it was based on an exception.
- InnerResult
Returns the comparer result for any inner comparison that caused this result to fail; returns
nullif there was no inner comparison.
- MismatchIndexX
Returns the index of the mismatch for the
Xvalue, if the comparison failed on a specific index.
- MismatchIndexY
Returns the index of the mismatch for the
Yvalue, if the comparison failed on a specific index.
- X
The left-hand value in the comparison
- Y
The right-hand value in the comparison
Methods
- Equals(object?)
Determines whether the specified object is equal to the current object.
- Equals(AssertEqualityResult?)
Determines whether the specified object is equal to the current object.
- ForMismatch(object?, object?, int, Exception?, AssertEqualityResult?)
Creates an instance of AssertEqualityResult where the values were not equal, and there is a single mismatch index (for example, when comparing two collections).
- ForMismatch(object?, object?, int, int, Exception?, AssertEqualityResult?)
Creates an instance of AssertEqualityResult where the values were not equal, and there are separate mismatch indices (for example, when comparing two strings under special circumstances).
- ForResult(bool, object?, object?, Exception?, AssertEqualityResult?)
Creates an instance of AssertEqualityResult.
- GetHashCode()
Gets a hash code for the object, to be used in hashed containers.
Operators
- operator ==(AssertEqualityResult?, AssertEqualityResult?)
Determines whether two instances of AssertEqualityResult are equal.
- operator !=(AssertEqualityResult?, AssertEqualityResult?)
Determines whether two instances of AssertEqualityResult are not equal.