ActualException

public interface ActualException<T extends Throwable> implements ActualObject<T>(source)

A type representing the expected exceptional behavior in a test.

Author

Dustin Glaser

Parameters

<T>

the type of the expected exception

Functions

Link copied to clipboard
public abstract T behavior()
Returns the object under test.
public abstract Object behavior()
Returns an object representing the behavior of the test.
Link copied to clipboard
public boolean display()
Link copied to clipboard
public T exception()
Returns the exception thrown in the test.
Link copied to clipboard
public T object()
Returns the object under test.
Link copied to clipboard
public static ActualException<T> of<T extends Throwable>(T exception, boolean successful)
Returns an instance representing behavior where the given exception was thrown or an behavior where no exception was thrown if no exception is given.
public static ActualObject<T> of<T>(T object, boolean successful)
public static Actual of(Object behavior, boolean successful)

public static ActualException<T> of<T extends Throwable>(T exception, boolean successful, Function<String, String> formatter)
Returns an instance representing behavior where the given exception was thrown or, if no exception is given, an behavior where no exception was thrown.
public static ActualObject<T> of<T>(T object, boolean successful, Function<String, String> formatter)
Returns an instance representing a behavior where the given object was tested or, if no object was given, an behavior where no object was returned.
Link copied to clipboard
public String string(Stringifier stringifier)
Returns a string representation of the behavior under test using the given stringifier to make the behavior human-readable.
Link copied to clipboard
public abstract boolean successful()
public static Actual successful(Object behavior)
Link copied to clipboard
public static Actual unexpected(Object behavior)