Class RuntimeServiceStubBuilder
- java.lang.Object
-
- org.camunda.community.mockito.service.RuntimeServiceStubBuilder
-
public class RuntimeServiceStubBuilder extends Object
Builder to stub the runtime service behavior regarding variables.
-
-
Constructor Summary
Constructors Constructor Description RuntimeServiceStubBuilder(org.camunda.bpm.engine.RuntimeService runtimeService)Constructs the builder with no variables.RuntimeServiceStubBuilder(org.camunda.bpm.engine.RuntimeService runtimeService, org.camunda.bpm.engine.variable.VariableMap variables, org.camunda.bpm.engine.variable.VariableMap localVariables)Constructs the builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.camunda.bpm.engine.RuntimeServicebuild()Builds the stubs, configuring the mockito behavior on specified runtime service mock.<T> RuntimeServiceStubBuilderdefine(io.holunda.camunda.bpm.data.factory.VariableFactory<T> variableFactory)Defines a new variable to watch for.<T> RuntimeServiceStubBuilderdefineAndInitialize(io.holunda.camunda.bpm.data.factory.VariableFactory<T> variableFactory, T initialValue)Defines a new variable to watch for and sets initial value.<T> RuntimeServiceStubBuilderdefineAndInitializeLocal(io.holunda.camunda.bpm.data.factory.VariableFactory<T> variableFactory, T initialValue)Defines a new variable to watch for and sets initial value to local variable.
-
-
-
Constructor Detail
-
RuntimeServiceStubBuilder
public RuntimeServiceStubBuilder(org.camunda.bpm.engine.RuntimeService runtimeService, org.camunda.bpm.engine.variable.VariableMap variables, org.camunda.bpm.engine.variable.VariableMap localVariables)Constructs the builder.- Parameters:
runtimeService- runtime service mocked by mockito.variables- variables to use.localVariables- local variables to use.
-
RuntimeServiceStubBuilder
public RuntimeServiceStubBuilder(org.camunda.bpm.engine.RuntimeService runtimeService)
Constructs the builder with no variables.- Parameters:
runtimeService- runtime service mocked by mockito.
-
-
Method Detail
-
define
public <T> RuntimeServiceStubBuilder define(io.holunda.camunda.bpm.data.factory.VariableFactory<T> variableFactory)
Defines a new variable to watch for.- Type Parameters:
T- type of the variable.- Parameters:
variableFactory- variable factory for the variable.- Returns:
- builder.
-
defineAndInitialize
public <T> RuntimeServiceStubBuilder defineAndInitialize(io.holunda.camunda.bpm.data.factory.VariableFactory<T> variableFactory, T initialValue)
Defines a new variable to watch for and sets initial value.- Type Parameters:
T- type of the variable.- Parameters:
variableFactory- variable factory for the variable.initialValue- initial value.- Returns:
- builder.
-
defineAndInitializeLocal
public <T> RuntimeServiceStubBuilder defineAndInitializeLocal(io.holunda.camunda.bpm.data.factory.VariableFactory<T> variableFactory, T initialValue)
Defines a new variable to watch for and sets initial value to local variable.- Type Parameters:
T- type of the variable.- Parameters:
variableFactory- variable factory for the variable.initialValue- initial value.- Returns:
- builder.
-
build
public org.camunda.bpm.engine.RuntimeService build()
Builds the stubs, configuring the mockito behavior on specified runtime service mock.
-
-