beGreaterThan method

NumericAssertions beGreaterThan(
  1. num expected
)

Asserts that the numeric value is odd.

Implementation

NumericAssertions beGreaterThan(num expected) {
  if (isReversed) {
    if (subject! > expected) {
      throw ShouldlyTestFailureError(
        '\n$subjectLabel number\n    $subject\nshould not greater than\n    $expected',
      );
    }
  } else {
    if (subject! <= expected) {
      throw ShouldlyTestFailureError(
        '\n$subjectLabel number\n    $subject\nshould be greater than\n    $expected',
      );
    }
  }

  return NumericAssertions(subject);
}