All Superinterfaces:
Satisfies<A>
All Known Subinterfaces:
ArrayNodeDsl<A>, JsonNodeAssertDsl<A>, ObjectNodeDsl<A>, TextNodeDsl<A>
All Known Implementing Classes:
ArrayNodes, AssertJson, ConditionList, CoreJsonAssertion, HamcrestJsonAssertion, HamcrestJsonAssertionBuilder, JsonAssertDslBuilders.At, ObjectNodes, PathDsl, TextNodes

public interface Sizeable<A> extends Satisfies<A>
  • Method Summary

    Modifier and Type
    Method
    Description
    default A
    hasSize(int expected)
    Depending on the type of node, this will detect size
    default A
    Depending on the type of node, this will detect emptiness
    Requiring this node to be a sizeable node, this switches to NumberComparisonDsl to allow criteria to be specified for the size.

    Methods inherited from interface uk.org.webcompere.modelassert.json.dsl.Satisfies

    satisfies, satisfies
  • Method Details

    • isEmpty

      default A isEmpty()
      Depending on the type of node, this will detect emptiness
      Returns:
      the CoreJsonAssertion for fluent assertions, with this condition added
    • hasSize

      default A hasSize(int expected)
      Depending on the type of node, this will detect size
      Returns:
      the CoreJsonAssertion for fluent assertions, with this condition added
    • size

      default NumberComparisonDsl<A> size()
      Requiring this node to be a sizeable node, this switches to NumberComparisonDsl to allow criteria to be specified for the size.
      Returns:
      the CoreJsonAssertion for fluent assertions, with this condition added