public class FunctionCallExceptionExpectation<T extends java.lang.Throwable> extends java.lang.Object implements TestExpectation
Constructor and Description |
---|
FunctionCallExceptionExpectation(java.lang.Class<T> defaultExpectedException) |
FunctionCallExceptionExpectation(java.lang.Class<T> exception,
AssertionCall<T> assertion) |
Modifier and Type | Method and Description |
---|---|
void |
handleExceptionNotThrown(ConsumerProducerSet consumerProducerSet)
Called when exception is not thrown after calling the call under test.
|
void |
handleThrownException(ConsumerProducerSet consumerProducerSet,
java.lang.Throwable thrownException)
Called when exception is thrown after calling the call under test.
|
java.lang.String |
toString() |
public FunctionCallExceptionExpectation(java.lang.Class<T> defaultExpectedException)
public FunctionCallExceptionExpectation(java.lang.Class<T> exception, AssertionCall<T> assertion)
public void handleExceptionNotThrown(ConsumerProducerSet consumerProducerSet)
TestExpectation
AssertionError
exception is expected in the implemented TestExpectation
.handleExceptionNotThrown
in interface TestExpectation
consumerProducerSet
- User identifiers used when calling the call under testpublic void handleThrownException(ConsumerProducerSet consumerProducerSet, java.lang.Throwable thrownException) throws java.lang.Throwable
TestExpectation
AssertionError
exception if the exception is not expected or the exception is
not otherwise expected (e.g. custom assertion fails).handleThrownException
in interface TestExpectation
consumerProducerSet
- User identifiers used when calling the call under testthrownException
- Thrown exceptionjava.lang.Throwable
- If an exception is thrownpublic java.lang.String toString()
toString
in class java.lang.Object