Class CallActivityMockForSpringContext
- java.lang.Object
-
- org.camunda.community.mockito.process.CallActivityMock
-
- org.camunda.community.mockito.process.CallActivityMockForSpringContext
-
public class CallActivityMockForSpringContext extends CallActivityMock
Implementation that registers the delegates mocks for the mocked subprocess to the gived spring bean context.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.camunda.community.mockito.process.CallActivityMock
CallActivityMock.MockedModelConfigurer
-
-
Constructor Summary
Constructors Constructor Description CallActivityMockForSpringContext(String processId, CallActivityMock.MockedModelConfigurer modelConfigurer, org.springframework.beans.factory.config.SingletonBeanRegistry springBeanRegistry)CallActivityMockForSpringContext(String processId, CallActivityMock.MockedModelConfigurer modelConfigurer, org.springframework.context.ApplicationContext applicationContext)Variant with an ApplicationContext as the parameter.CallActivityMockForSpringContext(String processId, org.springframework.beans.factory.config.SingletonBeanRegistry springBeanRegistry)Constructor that does not allow for customizing of the mocked subprocess modelCallActivityMockForSpringContext(String processId, org.springframework.context.ApplicationContext applicationContext)Variant with an ApplicationContext as the parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.beans.factory.config.SingletonBeanRegistrygetSpringBeanRegistry()protected voidregisterJavaDelegateMock(String delegateReferenceName, org.camunda.bpm.engine.delegate.JavaDelegate delegate)Registers a delegate under the specified name within the appropriate context.-
Methods inherited from class org.camunda.community.mockito.process.CallActivityMock
deploy, deploy, onExecutionAddVariable, onExecutionAddVariables, onExecutionDo, onExecutionDo, onExecutionRunIntoError, onExecutionSendMessage, onExecutionSendMessage, onExecutionSetVariables, onExecutionWaitForMessage, onExecutionWaitForSignal, onExecutionWaitForTimerWithDate, onExecutionWaitForTimerWithDate, onExecutionWaitForTimerWithDuration
-
-
-
-
Constructor Detail
-
CallActivityMockForSpringContext
public CallActivityMockForSpringContext(String processId, CallActivityMock.MockedModelConfigurer modelConfigurer, org.springframework.beans.factory.config.SingletonBeanRegistry springBeanRegistry)
- Parameters:
processId- Process definition key of the subprocess to mock. This should be the value of the 'called element' attribute of the mocked CallActivity element.modelConfigurer- Object that allows to customize the mock process model for the subprocessspringBeanRegistry- Spring context to place the implementations of the activities in the mocked process to
-
CallActivityMockForSpringContext
public CallActivityMockForSpringContext(String processId, CallActivityMock.MockedModelConfigurer modelConfigurer, org.springframework.context.ApplicationContext applicationContext)
Variant with an ApplicationContext as the parameter. This is usually easier to get access to in the tests (e.g. via autowiring).
-
CallActivityMockForSpringContext
public CallActivityMockForSpringContext(String processId, org.springframework.beans.factory.config.SingletonBeanRegistry springBeanRegistry)
Constructor that does not allow for customizing of the mocked subprocess model
-
CallActivityMockForSpringContext
public CallActivityMockForSpringContext(String processId, org.springframework.context.ApplicationContext applicationContext)
Variant with an ApplicationContext as the parameter. This is usually easier to get access to in the tests (e.g. via autowiring).
-
-
Method Detail
-
getSpringBeanRegistry
public org.springframework.beans.factory.config.SingletonBeanRegistry getSpringBeanRegistry()
-
registerJavaDelegateMock
protected void registerJavaDelegateMock(String delegateReferenceName, org.camunda.bpm.engine.delegate.JavaDelegate delegate)
Description copied from class:CallActivityMockRegisters a delegate under the specified name within the appropriate context. The implementation in this class uses the thread local mock registry, but subclasses might use e.g. a Spring context.- Overrides:
registerJavaDelegateMockin classCallActivityMock- Parameters:
delegateReferenceName- Name under which the delegate should be registered. After the registration, the delegate can be referenced in process models as '${name}'.delegate- The delegate instance to register
-
-