Class ValidationsBuilder

java.lang.Object
com.shaft.validation.internal.ValidationsBuilder

public class ValidationsBuilder extends Object
  • Constructor Details

  • Method Details

    • object

      public NativeValidationsBuilder object(Object actualValue)
      Build a native validation to check against the target object
      Parameters:
      actualValue - the actual object that will be compared against
      Returns:
      a NativeValidationsBuilder object to continue building your validation
    • number

      public NumberValidationsBuilder number(Number actualValue)
      Build a number validation to check against the target number
      Parameters:
      actualValue - the actual number that will be compared against
      Returns:
      a NumberValidationsBuilder object to continue building your validation
    • element

      public WebDriverElementValidationsBuilder element(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By locator)
    • browser

      public WebDriverBrowserValidationsBuilder browser(org.openqa.selenium.WebDriver driver)
      Build a WebDriver browser validation to check against the target browser
      Returns:
      a WebDriverBrowserValidationsBuilder object to continue building your validation
    • response

      public RestValidationsBuilder response(Object response)
      Build an API response validation to check against the target API response
      Parameters:
      response - the target API response object
      Returns:
      a RestValidationsBuilder object to continue building your validation
    • file

      public FileValidationsBuilder file(String folderRelativePath, String fileName)
      Build a file validation to check against the target file
      Parameters:
      folderRelativePath - relative path to the targetDirectory
      fileName - target fileName
      Returns:
      a FileValidationsBuilder object to continue building your validation
    • forceFail

      public ValidationsExecutor forceFail()
      Force fails the current validation
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • forceFail

      public ValidationsExecutor forceFail(String message)