IntegerAssertions<T>.Equal Method
Definition
Asserts that the integer value is equal to the expected value. Supports comparing integer values of different types.
c#
public new AssertionsChain<IntegerAssertions<T>, T> Equal<TOther>(TOther expected)
where TOther : struct, IBinaryInteger<TOther>;Type Parameters
| Name | Description |
|---|---|
TOther | The type of the expected value. |
Parameters
| Name | Type | Description |
|---|---|---|
expected | TOther | The expected value. |
Returns
AssertionsChain<IntegerAssertions<T>, T>
An AssertionsChain<TAssertions, T> for chaining further assertions.
Remarks
If the expected value cannot be represented in type T (for example, comparing a byte with 300), an AssertionException will be thrown with a descriptive message indicating the overflow.