Class RestValidationsBuilder

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

public class RestValidationsBuilder extends Object
  • Constructor Details

  • Method Details

    • isEqualToFileContent

      public ValidationsExecutor isEqualToFileContent(String fileRelativePath)
      Use this to check if the content of the provided actual response object is equal to the expected file content
      Parameters:
      fileRelativePath - relative path to the target expected response file
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • isEqualToFileContentIgnoringOrder

      public ValidationsExecutor isEqualToFileContentIgnoringOrder(String fileRelativePath)
      Use this to check if the content of the provided actual response object is equal to the expected file content (Ignoring Order)
      Parameters:
      fileRelativePath - relative path to the target expected response file
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • doesNotEqualFileContent

      public ValidationsExecutor doesNotEqualFileContent(String fileRelativePath)
      Use this to check if the content of the provided actual response object is not equal to the expected file content
      Parameters:
      fileRelativePath - relative path to the target expected response file
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • doesNotEqualFileContentIgnoringOrder

      public ValidationsExecutor doesNotEqualFileContentIgnoringOrder(String fileRelativePath)
      Use this to check if the content of the provided actual response object is not equal to the expected file content (Ignoring Order)
      Parameters:
      fileRelativePath - relative path to the target expected response file
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • containsFileContent

      public ValidationsExecutor containsFileContent(String fileRelativePath)
      Use this to check if the content of the provided actual response object contains the expected file content
      Parameters:
      fileRelativePath - relative path to the target expected response file
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • doesNotContainFileContent

      public ValidationsExecutor doesNotContainFileContent(String fileRelativePath)
      Use this to check if the content of the provided actual response object does not contain the expected file content
      Parameters:
      fileRelativePath - relative path to the target expected response file
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • extractedJsonValue

      public NativeValidationsBuilder extractedJsonValue(String jsonPath)
      Use this to extract a certain value from the provided actual response object and check against it
      Parameters:
      jsonPath - JSONPath of the target value; the JSONPath expression that will be evaluated in order to extract the desired value [without the trailing $.] , please refer to these urls for examples: SmartBear.com/jsonpath jsonpath.com/
      Returns:
      a NativeValidationsBuilder object to continue building your validation
    • extractedJsonValueAsList

      public NativeValidationsBuilder extractedJsonValueAsList(String jsonPath)
      Use this to extract a certain value from the provided actual response object as list and check every item against it
      Parameters:
      jsonPath - JSONPath of the target value; the JSONPath expression that will be evaluated in order to extract the desired value [without the trailing $.] , please refer to these urls for examples: SmartBear.com/jsonpath jsonpath.com/
      Returns:
      a NativeValidationsBuilder object to continue building your validation
    • body

      public NativeValidationsBuilder body()
    • time

      public NumberValidationsBuilder time()
    • matchesSchema

      public ValidationsExecutor matchesSchema(String fileRelativePath)
      Use this to check if the content of the provided actual response object matches the schema for the expected file content
      Parameters:
      fileRelativePath - relative path to the target expected response file
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation
    • doesNotMatchSchema

      public ValidationsExecutor doesNotMatchSchema(String fileRelativePath)
      Use this to check if the content of the provided actual response object matches the schema for the expected file content
      Parameters:
      fileRelativePath - relative path to the target expected response file
      Returns:
      a ValidationsExecutor object to set your custom validation message (if needed) and then perform() your validation