Skip to content

ComparableAssertions<TSelf, T> Class ​

Definition ​

Base class for assertions on values that can be ordered using IComparable<T>.

c#
public abstract class ComparableAssertions<TSelf, T> : ObjectAssertions<TSelf, T>
   where TSelf : ComparableAssertions<TSelf, T>
   where T : IComparable<T>

View source

Type Parameters ​

NameDescription
TSelfThe type of the derived assertions class, returned from And to allow chaining.
TThe type of the value being asserted on.

Constructors ​

NameDescription
ComparableAssertions(T)Base class for assertions on values that can be ordered using IComparable<T>.

Methods ​

NameDescription
BeGreaterThan(T)Asserts that the value is greater than the expected value.
BeGreaterThanOrEqualTo(T)Asserts that the value is greater than or equal to the expected value.
BeInRange(T, T)Asserts that the value is between the specified minimum and maximum values, inclusive.
BeLessThan(T)Asserts that the value is less than the expected value.
BeLessThanOrEqualTo(T)Asserts that the value is less than or equal to the expected value.