Class Validations

java.lang.Object
com.shaft.validation.Validations

public class Validations extends Object
Entry point for building assertions and verifications in SHAFT tests.

Use assertThat() to create a hard assertion that stops the test on failure, or verifyThat() for a soft assertion that collects failures and reports them at the end of the test.

Usage example:

Validations.assertThat().object(actual).isEqualTo(expected).perform();
Validations.verifyThat().number(count).isGreaterThan(0).perform();
See Also:
  • Method Details

    • assertThat

      public static ValidationsBuilder assertThat()
      Start building your assertion (Note: if an assertion fails the test method execution will stop and fail)
      Returns:
      a ValidationsBuilder Object to start building your validation
    • verifyThat

      public static ValidationsBuilder verifyThat()
      Start building your verification (Note: if a verification fails the test method execution will continue normally and all failures will be reported at the end)
      Returns:
      a ValidationsBuilder Object to start building your validation