ObjectAssertions<T>.Equal Method
Overloads
| Name | Description |
|---|---|
Equal(T) |
Asserts that the value is equal to the expected value using the default equality comparer. |
Equal(T, IEqualityComparer<T>) |
Asserts that the value is equal to the expected value using the specified equality comparer. |
Equal(T, Func<T, T, Boolean>) |
Equal(T)
Asserts that the value is equal to the expected value using the default equality comparer.
public ObjectAssertionsChain<T> Equal(T? expected);
Parameters
| Name | Type | Description |
|---|---|---|
expected |
T |
The expected value. |
Returns
An ObjectAssertionsChain<T> for chaining further assertions.
Equal(T, IEqualityComparer<T>)
Asserts that the value is equal to the expected value using the specified equality comparer.
public ObjectAssertionsChain<T> Equal(T? expected, IEqualityComparer<T> comparer);
Parameters
| Name | Type | Description |
|---|---|---|
expected |
T |
The expected value. |
comparer |
IEqualityComparer<T> |
The equality comparer to use for the comparison. |
Returns
An ObjectAssertionsChain<T> for chaining further assertions.
Equal(T, Func<T, T, Boolean>)
public ObjectAssertionsChain<T> Equal(T? expected, Func<T, T, bool> predicate);
Parameters
| Name | Type | Description |
|---|---|---|
expected |
T |
|
predicate |
Func<T, T, Boolean> |