beLessThan method
Asserts that the numeric value is less than the specified expected
value.
expected
The value to compare the current numeric value with.
Implementation
NumericAssertions beLessThan(num expected) {
if (isReversed) {
if (subject! < expected) {
throw ShouldlyTestFailureError(
'\n$subjectLabel number\n $subject\nshould not less than\n $expected',
);
}
} else {
if (subject! >= expected) {
throw ShouldlyTestFailureError(
'\n$subjectLabel number\n $subject\nshould be less than\n $expected',
);
}
}
return NumericAssertions(subject);
}