FloatingPointAssertions<T> Class
Definition
Provides assertions for floating-point values.
public sealed class FloatingPointAssertions<T> : ObjectAssertions<T>
where T : struct, IFloatingPoint<T>
Type Parameters
| Name |
Description |
T |
The floating-point type of the value being asserted on. |
Constructors
Methods
| Name |
Description |
BeApproximately(T, T) |
Asserts that the floating-point value is approximately equal to the expected value within the specified precision. |
BeGreaterThan(T, T) |
Asserts that the floating-point value is greater than the expected value. |
BeGreaterThanOrEqualTo(T, T) |
Asserts that the floating-point value is greater than or equal to the expected value. |
BeInfinity() |
Asserts that the floating-point value is positive or negative infinity. |
BeLessThan(T, T) |
Asserts that the floating-point value is less than the expected value. |
BeLessThanOrEqualTo(T, T) |
Asserts that the floating-point value is less than or equal to the expected value. |
BeNaN() |
Asserts that the floating-point value is NaN (not a number). |
BeNegative() |
Asserts that the floating-point value is negative. |
BeNegativeInfinity() |
Asserts that the floating-point value is negative infinity. |
BePositive() |
Asserts that the floating-point value is positive. |
BePositiveInfinity() |
Asserts that the floating-point value is positive infinity. |
BeZero() |
Asserts that the floating-point value is zero. |
NotBeInfinity() |
Asserts that the floating-point value is not positive or negative infinity. |
NotBeNaN() |
Asserts that the floating-point value is not NaN (not a number). |
NotBeNegative() |
Asserts that the floating-point value is not negative. |
NotBePositive() |
Asserts that the floating-point value is not positive. |
NotBeZero() |
Asserts that the floating-point value is not zero. |