ThrowableResult

public class ThrowableResult<R> implements Call<R>(source)

An instance of ThrowableResult represents a call that resulted in an Throwable.

Parameters

<R>

the type of expected result

Constructors

Link copied to clipboard
public void ThrowableResult(Throwable throwable)

Functions

Link copied to clipboard
public R assertNormal()
public R assertNormal(String message)
public R assertNormal(Supplier<String> messageSupplier)
Asserts that the call resulted in a result of type type and returns the result.
Link copied to clipboard
public E assertThrows<E extends Throwable>(Class<E> type)
Asserts that the call resulted in n throwable of type type and returns the throwable.
public E assertThrows<E extends Throwable>(Class<E> type, String message)
public T assertThrows<T extends Throwable>(Class<T> type, Supplier<String> messageSupplier)
Asserts that the call resulted in a throwable of type type and returns the throwable.