Class CaseServiceStubBuilder
- java.lang.Object
-
- org.camunda.community.mockito.service.CaseServiceStubBuilder
-
public class CaseServiceStubBuilder extends Object
Builder to stub the case service behavior regarding variables.
-
-
Constructor Summary
Constructors Constructor Description CaseServiceStubBuilder(org.camunda.bpm.engine.CaseService caseService)Constructs the builder with no variables.CaseServiceStubBuilder(org.camunda.bpm.engine.CaseService caseService, 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.CaseServicebuild()Builds the stubs, configuring the mockito behavior on specified case service mock.<T> CaseServiceStubBuilderdefine(io.holunda.camunda.bpm.data.factory.VariableFactory<T> variableFactory)Defines a new variable to watch for.<T> CaseServiceStubBuilderdefineAndInitialize(io.holunda.camunda.bpm.data.factory.VariableFactory<T> variableFactory, T initialValue)Defines a new variable to watch for and sets initial value.<T> CaseServiceStubBuilderdefineAndInitializeLocal(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
-
CaseServiceStubBuilder
public CaseServiceStubBuilder(org.camunda.bpm.engine.CaseService caseService, org.camunda.bpm.engine.variable.VariableMap variables, org.camunda.bpm.engine.variable.VariableMap localVariables)Constructs the builder.- Parameters:
caseService- case service mocked by mockito.variables- variables to use.localVariables- local variables to use.
-
CaseServiceStubBuilder
public CaseServiceStubBuilder(org.camunda.bpm.engine.CaseService caseService)
Constructs the builder with no variables.- Parameters:
caseService- case service mocked by mockito.
-
-
Method Detail
-
define
public <T> CaseServiceStubBuilder 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> CaseServiceStubBuilder 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> CaseServiceStubBuilder 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.CaseService build()
Builds the stubs, configuring the mockito behavior on specified case service mock.
-
-