Method ForMismatchedValuesWithError
- Namespace
- Xunit.Sdk
- Assembly
- xunit.v3.assert.dll
ForMismatchedValuesWithError(object?, object?, Exception?, string?)
Creates a new instance of EqualException to be thrown when two values are not equal. This may be simple values (like intrinsics) or complex values (like classes or structs). Used when an error has occurred during comparison.
public static EqualException ForMismatchedValuesWithError(object? expected, object? actual, Exception? error = null, string? banner = null)
Parameters
expectedobjectThe expected value
actualobjectThe actual value
errorExceptionThe optional exception that was thrown during comparison
bannerstringThe banner to show; if
null, then the standard banner of "Values differ" will be used. Iferroris notnull, then the banner used will always be "Exception thrown during comparison", regardless of the value passed here.