Interface ObjectNodeDsl<A>

Type Parameters:
A - the assertion type
All Superinterfaces:
Satisfies<A>, Sizeable<A>
All Known Subinterfaces:
JsonNodeAssertDsl<A>
All Known Implementing Classes:
AssertJson, ConditionList, CoreJsonAssertion, HamcrestJsonAssertion, HamcrestJsonAssertionBuilder, JsonAssertDslBuilders.At, ObjectNodes, PathDsl

public interface ObjectNodeDsl<A> extends Satisfies<A>, Sizeable<A>
Assertions specific to object nodes
  • Method Details

    • satisfiesObjectCondition

      default A satisfiesObjectCondition(Condition condition)
      Assert that the value is an object, meeting an additional condition
      Parameters:
      condition - the number condition
      Returns:
      the assertion for fluent assertions, with this condition added
    • isObject

      default A isObject()
      Assert that the value is an object
      Returns:
      the assertion for fluent assertions, with this condition added
    • isNotObject

      default A isNotObject()
      Assert that the value is not an object
      Returns:
      the assertion for fluent assertions, with this condition added
    • containsKey

      default A containsKey(String key)
      Assert that the value contains a key/field
      Parameters:
      key - the key to search for
      Returns:
      the assertion for fluent assertions, with this condition added
    • doesNotContainKey

      default A doesNotContainKey(String key)
      Assert that the value does not contain a key/field
      Parameters:
      key - the key to search for
      Returns:
      the assertion for fluent assertions, with this condition added
    • containsKeys

      default A containsKeys(String key, String... keys)
      Assert that the value contains multiple keys/fields
      Parameters:
      key - the first key to search for
      keys - the remaining keys to search for
      Returns:
      the assertion for fluent assertions, with this condition added
    • doesNotContainKeys

      default A doesNotContainKeys(String key, String... keys)
      Assert that the value does not contain multiple keys/fields
      Parameters:
      key - the first key to search for
      keys - the remaining keys to search for
      Returns:
      the assertion for fluent assertions, with this condition added
    • containsKeysExactly

      default A containsKeysExactly(String key, String... keys)
      Assert that the value contains multiple keys/fields, no more, no less, order maintained. This should be used instead of containsKey(String) to mean contains only the key.
      Parameters:
      key - the first key to search for
      keys - the remaining keys to search for
      Returns:
      the assertion for fluent assertions, with this condition added
    • containsKeysExactlyInAnyOrder

      default A containsKeysExactlyInAnyOrder(String key, String... keys)
      Assert that the value contains multiple keys/fields, no more, no less, any order
      Parameters:
      key - the first key to search for
      keys - the remaining keys to search for
      Returns:
      the assertion for fluent assertions, with this condition added