public class ExceptionThrowingMockBehavior extends Object implements ValidatableMockBehavior
| Constructor and Description |
|---|
ExceptionThrowingMockBehavior(Throwable exceptionToThrow)
Creates the throwing behavior for the given exception.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertCanExecute(ProxyInvocation proxyInvocation)
Checks whether the mock behavior can be executed for the given invocation.
|
Object |
execute(ProxyInvocation proxyInvocation)
Executes the mock behavior.
|
public ExceptionThrowingMockBehavior(Throwable exceptionToThrow)
exceptionToThrow - The exception, not nullpublic void assertCanExecute(ProxyInvocation proxyInvocation) throws UnitilsException
assertCanExecute in interface ValidatableMockBehaviorproxyInvocation - The proxy method invocation, not nullUnitilsExceptionpublic Object execute(ProxyInvocation proxyInvocation) throws Throwable
execute in interface MockBehaviorproxyInvocation - The proxy method invocation, not nullThrowableCopyright © 2016. All Rights Reserved.