Method ForMismatch
- Namespace
- Xunit.Sdk
- Assembly
- xunit.v3.assert.dll
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).
public static AssertEqualityResult ForMismatch(object? x, object? y, int mismatchIndex, Exception? exception = null, AssertEqualityResult? innerResult = null)
Parameters
xobjectThe left-hand value in the comparison
yobjectThe right-hand value in the comparison
mismatchIndexintThe mismatch index for both
XandYvaluesexceptionExceptionThe optional exception that was thrown to cause the failure
innerResultThe optional inner result that caused the equality failure
Returns
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).
public static AssertEqualityResult ForMismatch(object? x, object? y, int mismatchIndexX, int mismatchIndexY, Exception? exception = null, AssertEqualityResult? innerResult = null)
Parameters
xobjectThe left-hand value in the comparison
yobjectThe right-hand value in the comparison
mismatchIndexXintThe mismatch index for the
XvaluemismatchIndexYintThe mismatch index for the
YvalueexceptionExceptionThe optional exception that was thrown to cause the failure
innerResultThe optional inner result that caused the equality failure