|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.unitils.mock.mockbehavior.impl.ExceptionThrowingMockBehavior
public class ExceptionThrowingMockBehavior
Mock behavior that throws a given exception.
Constructor Summary | |
---|---|
ExceptionThrowingMockBehavior(Throwable exceptionToThrow)
Creates the throwing behavior for the given exception. |
Method Summary | |
---|---|
void |
assertCanExecute(ProxyInvocation proxyInvocation)
Checks whether the mock behavior can be executed for the given invocation. |
Object |
execute(ProxyInvocation proxyInvocation)
Executes the mock behavior. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExceptionThrowingMockBehavior(Throwable exceptionToThrow)
exceptionToThrow
- The exception, not nullMethod Detail |
---|
public void assertCanExecute(ProxyInvocation proxyInvocation) throws UnitilsException
assertCanExecute
in interface ValidatableMockBehavior
proxyInvocation
- The proxy method invocation, not null
UnitilsException
public Object execute(ProxyInvocation proxyInvocation) throws Throwable
execute
in interface MockBehavior
proxyInvocation
- The proxy method invocation, not null
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |