NumericAssertions<TSelf, T> Class
Definition
Base class for assertions on numeric values, and other values that have a zero and a sign such as TimeSpan.
c#
public abstract class NumericAssertions<TSelf, T> : ComparableAssertions<TSelf, T>
where TSelf : NumericAssertions<TSelf, T>
where T : IComparable<T>Type Parameters
| Name | Description |
|---|---|
TSelf | The type of the derived assertions class, returned from And to allow chaining. |
T | The type of the value being asserted on. |
Constructors
| Name | Description |
|---|---|
NumericAssertions(T, T) | Base class for assertions on numeric values, and other values that have a zero and a sign such as TimeSpan. |
Methods
| Name | Description |
|---|---|
BeNegative() | Asserts that the value is negative (less than zero). |
BePositive() | Asserts that the value is positive (greater than zero). |
BeZero() | Asserts that the value is zero. |
NotBeNegative() | Asserts that the value is not negative (not less than zero). |
NotBePositive() | Asserts that the value is not positive (not greater than zero). |
NotBeZero() | Asserts that the value is not zero. |