beLessOrEqualThan method

NumericAssertions beLessOrEqualThan(
  1. num expected
)

Asserts that the numeric value is less or equal than the specified expected value.

expected The value to compare the current numeric value with.

Implementation

NumericAssertions beLessOrEqualThan(num expected) {
  if (isReversed) {
    return NumericAssertions(subject).beGreaterOrEqualThan(expected);
  }

  Execute.assertion
      .forCondition(subject! > expected)
      .failWith('$subject\n    \n$subject\nnot less than\n    $expected');

  return NumericAssertions(subject);
}