Class HamcrestJsonAssertionBuilder<T>

java.lang.Object
uk.org.webcompere.modelassert.json.hamcrest.HamcrestJsonAssertionBuilder<T>
Type Parameters:
T - the type of JSON that this asserts
All Implemented Interfaces:
JsonNodeAssertDsl<HamcrestJsonAssertion<T>>, ArrayNodeDsl<HamcrestJsonAssertion<T>>, BooleanNodeDsl<HamcrestJsonAssertion<T>>, NumberComparisonDsl<HamcrestJsonAssertion<T>>, NumberNodeDsl<HamcrestJsonAssertion<T>>, ObjectNodeDsl<HamcrestJsonAssertion<T>>, Sizeable<HamcrestJsonAssertion<T>>, TextNodeDsl<HamcrestJsonAssertion<T>>, IsEqualToDsl<HamcrestJsonAssertion<T>>, TreeComparisonDsl<HamcrestJsonAssertion<T>>, Satisfies<HamcrestJsonAssertion<T>>

public class HamcrestJsonAssertionBuilder<T> extends Object implements JsonNodeAssertDsl<HamcrestJsonAssertion<T>>
This is an interim object - the result of starting to build a hamcrest JSON assertion. It is not, itself a hamcrest matcher, but will produce one as soon as a meaningful assertion is added
  • Constructor Details

    • HamcrestJsonAssertionBuilder

      public HamcrestJsonAssertionBuilder(JsonProvider<T> provider)
  • Method Details

    • satisfies

      public HamcrestJsonAssertion<T> satisfies(Condition condition)
      Description copied from interface: Satisfies
      Add a condition that the input JSON must satisfy
      Specified by:
      satisfies in interface Satisfies<T>
      Parameters:
      condition - the condition
      Returns:
      this for fluent calling