Class HasValueWithLooseType

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

public class HasValueWithLooseType extends Object implements Condition
Performs the hasValue operation with flexibility and type flexibility. It works out the likely type of node from the input.
  • Constructor Details

    • HasValueWithLooseType

      public HasValueWithLooseType(Object expected)
      Construct with the expected value
      Parameters:
      expected - the value expected
  • Method Details

    • test

      public Result test(com.fasterxml.jackson.databind.JsonNode node)
      Description copied from interface: Condition
      Execute the test of the condition
      Specified by:
      test in interface Condition
      Parameters:
      node - 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