Package org.camunda.bpm.engine.test.mock
Class Mocks
java.lang.Object
org.camunda.bpm.engine.test.mock.Mocks
Registry for mock objects.
 
Usage: Mocks.register("myMock", myMock);
This class lets you register mock objects that will then be used by the
 MockElResolver. It binds a map of mock objects to ThreadLocal. This way, the 
 mocks can be set up independent of how the process engine configuration is built.
- Author:
- Nils Preusker - n.preusker@gmail.com
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ObjectThis method returns the mock object registered under the provided key or null if there is no object for the provided key.getMocks()static voidThis method lets you register a mock object.static voidreset()This method resets the internal map of mock objects.
- 
Constructor Details- 
Mockspublic Mocks()
 
- 
- 
Method Details- 
getMocks
- 
registerThis method lets you register a mock object. Make sure to register theMockExpressionManagerwith your process engine configuration.- Parameters:
- key- the key under which the mock object will be registered
- value- the mock object
 
- 
getThis method returns the mock object registered under the provided key or null if there is no object for the provided key.- Parameters:
- key- the key of the requested object
- Returns:
- the mock object registered under the provided key or null if there is no object for the provided key
 
- 
resetpublic static void reset()This method resets the internal map of mock objects.
 
-