|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.unitils.mock.mockbehavior.impl.DefaultValueReturningMockBehavior
public class DefaultValueReturningMockBehavior
Mock behavior that returns a default value.
Following defaults are used:
Constructor Summary | |
---|---|
DefaultValueReturningMockBehavior()
|
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. |
protected Number |
resolveNumber(Class<?> numberType)
Checking for the default java implementations of Number, this avoids class cast exceptions when using them |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultValueReturningMockBehavior()
Method 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)
execute
in interface MockBehavior
proxyInvocation
- The proxy method invocation, not null
protected Number resolveNumber(Class<?> numberType)
numberType
- The number type, not null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |