public class Engine extends Object implements InvocationHandler, Verifiable, ExpectationsState, Assert, LastExpectationProvider, StrategyRunner
NULL
NULL
NULL
Constructor and Description |
---|
Engine() |
Modifier and Type | Method and Description |
---|---|
void |
assertThat(Object actual,
Expression expression)
Assert method that asserts that the object passed in the actual parameter
passes the constraint passed in the expected parameter.
|
void |
beginVerify()
Changes mode to verifification mode
|
void |
endVerify()
Changes ends verification
|
ModifiableExpectation |
getLastExpectation() |
Object |
invocation(String id,
Class objectType,
String method,
Object[] arguments,
MethodHandle methodHandle)
Called when an invocation is made to a mock.
|
boolean |
isInSetupState() |
boolean |
isInVerifyState() |
void |
runStrategy(TestStep step) |
void |
setExceptionVerifier(ExceptionVerifier exceptionVerifier) |
void |
setExpectationListener(ExpectationListener expectationListener) |
void |
setProxyFactory(ProxyFactory proxyFactory) |
void |
setSectionProvider(SectionProvider sectionProvider) |
public void setSectionProvider(SectionProvider sectionProvider)
public Object invocation(String id, Class objectType, String method, Object[] arguments, MethodHandle methodHandle) throws Throwable
InvocationHandler
invocation
in interface InvocationHandler
id
- The id of the mock that made the invocationobjectType
- The type of the object that received the method invocationmethod
- The method that was invokedmethodHandle
- A callback to the original method on the receiving object.Exception
Throwable
InvocationHandler.invocation(java.lang.String, Class, java.lang.String, java.lang.Object[], MethodHandle)
public void beginVerify()
beginVerify
in interface Verifiable
public void endVerify()
endVerify
in interface Verifiable
public ModifiableExpectation getLastExpectation()
getLastExpectation
in interface LastExpectationProvider
public void setProxyFactory(ProxyFactory proxyFactory)
proxyFactory2
- public boolean isInSetupState()
isInSetupState
in interface ExpectationsState
public boolean isInVerifyState()
isInVerifyState
in interface ExpectationsState
public void assertThat(Object actual, Expression expression)
Assert
assertThat
in interface Assert
actual
- The actual object that is checked against the expected constraint.expression
- The constraint that actual is expected to passpublic void setExpectationListener(ExpectationListener expectationListener)
public void runStrategy(TestStep step) throws Throwable
runStrategy
in interface StrategyRunner
Throwable
public void setExceptionVerifier(ExceptionVerifier exceptionVerifier)
Copyright © 2005-2013 Agical AB. All Rights Reserved.