Class NumberValidationsBuilder

java.lang.Object
com.shaft.validation.NumberValidationsBuilder

public class NumberValidationsBuilder extends Object
  • Constructor Details

    • NumberValidationsBuilder

      public NumberValidationsBuilder(ValidationsBuilder validationsBuilder)
    • NumberValidationsBuilder

      public NumberValidationsBuilder(RestValidationsBuilder restValidationsBuilder)
  • Method Details

    • isEqualTo

      public ValidationsExecutor isEqualTo(Number expectedValue)
      Use this to check that the actual number is equal to the expected value
      Parameters:
      expectedValue - the test data / expected value for the number under test
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • equals

      public boolean equals(Object expectedValue)
      Overrides the default object method equals and is the same as calling isEqualTo((Number) expectedValue).perform();
      Overrides:
      equals in class Object
      Parameters:
      expectedValue - the test data / expected value for the number under test
      Returns:
      boolean value true if passed and throws AssertionError if failed (return value can be safely ignored)
    • doesNotEqual

      public ValidationsExecutor doesNotEqual(Number expectedValue)
      Use this to check that the actual number does not equal the expected value
      Parameters:
      expectedValue - the test data / expected value for the number under test
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • isGreaterThanOrEquals

      public ValidationsExecutor isGreaterThanOrEquals(Number expectedValue)
      Use this to check that the actual number is greater than or equal to the expected value
      Parameters:
      expectedValue - the test data / expected value for the number under test
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • isGreaterThan

      public ValidationsExecutor isGreaterThan(Number expectedValue)
      Use this to check that the actual number is greater than the expected value
      Parameters:
      expectedValue - the test data / expected value for the number under test
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • isLessThanOrEquals

      public ValidationsExecutor isLessThanOrEquals(Number expectedValue)
      Use this to check that the actual number is less than or equal to the expected value
      Parameters:
      expectedValue - the test data / expected value for the number under test
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • isLessThan

      public ValidationsExecutor isLessThan(Number expectedValue)
      Use this to check that the actual number is less than the expected value
      Parameters:
      expectedValue - the test data / expected value for the number under test
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation