All Known Subinterfaces:
ExpectedException<T>, ExpectedObject<T>
All Known Implementing Classes:
Nothing

public interface Expected

A type representing the expected behavior in a test.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Function<String,String>
    A function enclosing a string with brackets.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an object representing the expected behavior of the test.
    default boolean
     
    static Expected
    of(Object behavior)
     
    default String
    string(Stringifier stringifier)
    Returns a string representation of the expected behavior using the given stringifier to make the behavior human-readable.
  • Field Details

    • BRACKET_FORMATTER

      static final Function<String,String> BRACKET_FORMATTER
      A function enclosing a string with brackets.
  • Method Details

    • behavior

      Object behavior()

      Returns an object representing the expected behavior of the test.

      Returns:
      the object
    • display

      default boolean display()
    • string

      default String string(Stringifier stringifier)

      Returns a string representation of the expected behavior using the given stringifier to make the behavior human-readable.

      Parameters:
      stringifier - the stringifier
      Returns:
      the string
    • of

      static Expected of(Object behavior)