java.lang.Object
uk.org.webcompere.modelassert.json.condition.JsonAt
All Implemented Interfaces:
Condition

public class JsonAt extends Object implements Condition
The assertion of some JSON at a node within the tree
  • Constructor Details

    • JsonAt

      public JsonAt(String path, Condition condition)
      Construct with the location in the tree to at along with the condition to meet
      Parameters:
      path - the path in the tree - JSON Pointer
      condition - the Condition to satisfy
  • Method Details

    • test

      public Result test(com.fasterxml.jackson.databind.JsonNode json)
      Description copied from interface: Condition
      Execute the test of the condition
      Specified by:
      test in interface Condition
      Parameters:
      json - the json to test
      Returns:
      a Result explaining whether the condition was met and if not, why not
    • describe

      public String describe()
      Description copied from interface: Condition
      Describe the condition
      Specified by:
      describe in interface Condition
      Returns:
      description of the condition