Interface NumberComparisonDsl<A>

Type Parameters:
A - the assertion type
All Superinterfaces:
Satisfies<A>
All Known Subinterfaces:
JsonNodeAssertDsl<A>, NumberNodeDsl<A>
All Known Implementing Classes:
AssertJson, ConditionList, CoreJsonAssertion, HamcrestJsonAssertion, HamcrestJsonAssertionBuilder, JsonAssertDslBuilders.At, NumberNodes, PathDsl

public interface NumberComparisonDsl<A> extends Satisfies<A>
DSL assertions specific to arbitrary numbers
  • Method Details

    • satisfiesNumberCondition

      default A satisfiesNumberCondition(Condition condition)
      Assert that the value is a number, meeting an additional condition
      Parameters:
      condition - the number condition
      Returns:
      the assertion for fluent assertions, with this condition added
    • isGreaterThan

      default A isGreaterThan(Number number)
      Assert that the value is a number, greater than
      Parameters:
      number - the amount
      Returns:
      the assertion for fluent assertions, with this condition added
    • isGreaterThanOrEqualTo

      default A isGreaterThanOrEqualTo(Number number)
      Assert that the value is a number, greater than or equal to
      Parameters:
      number - the amount
      Returns:
      the assertion for fluent assertions, with this condition added
    • isLessThan

      default A isLessThan(Number number)
      Assert that the value is a number, less than the given number
      Parameters:
      number - the number to compare with
      Returns:
      the assertion for fluent assertions, with this condition added
    • isLessThanOrEqualTo

      default A isLessThanOrEqualTo(Number number)
      Assert that the value is a number, less than or equal to
      Parameters:
      number - the amount
      Returns:
      the assertion for fluent assertions, with this condition added
    • isBetween

      default A isBetween(Number firstInclusive, Number lastInclusive)
      Assert that the value lies between the limits
      Parameters:
      firstInclusive - the first one which the value must be greater than or equal to
      lastInclusive - the last one which the value must be less than or equal to
      Returns:
      the assertion for fluent assertions, with this condition added
    • isZero

      default A isZero()
      Assert that the value is a number, equal to 0
      Returns:
      the assertion for fluent assertions, with this condition added