Interface GraphQlTester.Entity<D,S extends GraphQlTester.Entity<D,S>>

Type Parameters:
D - the entity type
S - the Entity spec type
All Superinterfaces:
GraphQlTester.Traversable
All Known Subinterfaces:
GraphQlTester.EntityList<E>
Enclosing interface:
GraphQlTester

public static interface GraphQlTester.Entity<D,S extends GraphQlTester.Entity<D,S>> extends GraphQlTester.Traversable
Contains a decoded entity and provides options to assert it.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Return the decoded entity value(s).
    <T extends S>
    T
    isEqualTo(Object expected)
    Verify the decoded entity is equal to the given value.
    <T extends S>
    T
    Verify the decoded entity is not equal to the given value.
    <T extends S>
    T
    Verify the decoded entity is not the same instance as the given value.
    <T extends S>
    T
    isSameAs(Object expected)
    Verify the decoded entity is the same instance as the given value.
    <T extends S>
    T
    matches(Predicate<D> predicate)
    Verify the decoded entity matches the given predicate.
    <T extends S>
    T
    satisfies(Consumer<D> consumer)
    Verify the entity with the given Consumer.

    Methods inherited from interface org.springframework.graphql.test.tester.GraphQlTester.Traversable

    path, path
  • Method Details

    • isEqualTo

      <T extends S> T isEqualTo(Object expected)
      Verify the decoded entity is equal to the given value.
      Type Parameters:
      T - the Entity spec type
      Parameters:
      expected - the expected value
      Returns:
      the Entity spec for further assertions
    • isNotEqualTo

      <T extends S> T isNotEqualTo(Object other)
      Verify the decoded entity is not equal to the given value.
      Type Parameters:
      T - the Entity spec type
      Parameters:
      other - the value to check against
      Returns:
      the Entity spec for further assertions
    • isSameAs

      <T extends S> T isSameAs(Object expected)
      Verify the decoded entity is the same instance as the given value.
      Type Parameters:
      T - the Entity spec type
      Parameters:
      expected - the expected value
      Returns:
      the Entity spec for further assertions
    • isNotSameAs

      <T extends S> T isNotSameAs(Object other)
      Verify the decoded entity is not the same instance as the given value.
      Type Parameters:
      T - the Entity spec type
      Parameters:
      other - the value to check against
      Returns:
      the Entity spec for further assertions
    • matches

      <T extends S> T matches(Predicate<D> predicate)
      Verify the decoded entity matches the given predicate.
      Type Parameters:
      T - the Entity spec type
      Parameters:
      predicate - the predicate to apply
      Returns:
      the Entity spec for further assertions
    • satisfies

      <T extends S> T satisfies(Consumer<D> consumer)
      Verify the entity with the given Consumer.
      Type Parameters:
      T - the Entity spec type
      Parameters:
      consumer - the consumer to apply
      Returns:
      the Entity spec for further assertions
    • get

      D get()
      Return the decoded entity value(s).