ExpectedObject

public interface ExpectedObject<T> implements Expected(source)

A type representing the expected object in a test.

Author

Dustin Glaser

Parameters

<T>

the type of the expected object

Inheritors

Functions

Link copied to clipboard
public abstract Object behavior()
Returns an object representing the expected behavior of the test.
Link copied to clipboard
public boolean display()
Link copied to clipboard
public static Expected of(Object behavior)

public static ExpectedObject<T> of<T>(T object, Predicate<T> test)
public static ExpectedObject<T> of<T>(T object, Predicate<T> test, Function<String, String> formatter)
Returns an expected behavior where the expected object is described with the given object.
Link copied to clipboard
public String string(Stringifier stringifier)
Returns a string representation of the expected behavior using the given stringifier to make the behavior human-readable.
Link copied to clipboard
public abstract boolean test(T object)
Returns true if the given object is as expected.