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