public enum CamundaMockito extends Enum<CamundaMockito>
| Modifier and Type | Method and Description |
|---|---|
static void |
autoMock(String bpmnFileResource)
Takes a BPMN resource and registers mocks for all delegateExpressions.
|
static void |
autoMock(URL bpmnFile)
Takes a BPMN file and registers TaskListener-, ExecutionListener and
JavaDelegate-Mocks for every delegateExpression encountered.
|
static Set<String> |
candidateGroupIds(org.camunda.bpm.engine.delegate.DelegateTask task) |
static Set<String> |
candidateUserIds(org.camunda.bpm.engine.delegate.DelegateTask task) |
static DelegateCaseExecutionFake |
delegateCaseExecutionFake() |
static DelegateCaseVariableInstanceFake |
delegateCaseVariableInstanceFake() |
static DelegateExecutionFake |
delegateExecutionFake() |
static DelegateTaskFake |
delegateTaskFake() |
static FluentExecutionListenerMock |
getExecutionListenerMock(Class<?> type) |
static FluentExecutionListenerMock |
getExecutionListenerMock(String name)
Returns the registered FluentExecutionListenerMock instance for name.
|
static FluentJavaDelegateMock |
getJavaDelegateMock(Class<?> type) |
static FluentJavaDelegateMock |
getJavaDelegateMock(String name)
Returns the registered FluentJavaDelegateMock instance for name.
|
static <T> T |
getRegistered(Class<?> type) |
static <T> T |
getRegistered(String name) |
static FluentTaskListenerMock |
getTaskListenerMock(Class<?> type) |
static FluentTaskListenerMock |
getTaskListenerMock(String name)
Returns the registered FluentTaskListenerMock instance for name.
|
static ActivityStatisticsQueryMock |
mockActivityStatisticsQuery(org.camunda.bpm.engine.ManagementService serviceMock) |
static AuthorizationQueryMock |
mockAuthorizationQuery(org.camunda.bpm.engine.AuthorizationService serviceMock) |
static BatchQueryMock |
mockBatchQuery(org.camunda.bpm.engine.ManagementService serviceMock) |
static BatchStatisticsQueryMock |
mockBatchStatisticsQuery(org.camunda.bpm.engine.ManagementService serviceMock) |
static CaseDefinitionQueryMock |
mockCaseDefinitionQuery(org.camunda.bpm.engine.RepositoryService serviceMock) |
static CaseExecutionQueryMock |
mockCaseExecutionQuery(org.camunda.bpm.engine.CaseService serviceMock) |
static CaseInstanceQueryMock |
mockCaseInstanceQuery(org.camunda.bpm.engine.CaseService serviceMock) |
static DecisionDefinitionQueryMock |
mockDecisionDefinitionQuery(org.camunda.bpm.engine.RepositoryService serviceMock) |
static DeploymentQueryMock |
mockDeploymentQuery(org.camunda.bpm.engine.RepositoryService serviceMock) |
static DeploymentStatisticsQueryMock |
mockDeploymentStatisticsQuery(org.camunda.bpm.engine.ManagementService serviceMock) |
static EventSubscriptionQueryMock |
mockEventSubscriptionQuery(org.camunda.bpm.engine.RuntimeService serviceMock) |
static ExecutionQueryMock |
mockExecutionQuery(org.camunda.bpm.engine.RuntimeService serviceMock) |
static ExternalTaskQueryMock |
mockExternalTaskQuery(org.camunda.bpm.engine.ExternalTaskService serviceMock) |
static FilterQueryMock |
mockFilterQuery(org.camunda.bpm.engine.FilterService serviceMock) |
static GroupQueryMock |
mockGroupQuery(org.camunda.bpm.engine.IdentityService serviceMock) |
static HistoricActivityStatisticsQueryMock |
mockHistoricActivityStatisticsQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricBatchQueryMock |
mockHistoricBatchQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricCaseActivityInstanceQueryMock |
mockHistoricCaseActivityInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricCaseInstanceQueryMock |
mockHistoricCaseInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricDecisionInstanceQueryMock |
mockHistoricDecisionInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricDetailQueryMock |
mockHistoricDetailQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricIdentityLinkLogQueryMock |
mockHistoricIdentityLinkLogQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricIncidentQueryMock |
mockHistoricIncidentQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricJobLogQueryMock |
mockHistoricJobLogQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricProcessInstanceQueryMock |
mockHistoricProcessInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricTaskInstanceQueryMock |
mockHistoricTaskInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static HistoricVariableInstanceQueryMock |
mockHistoricVariableInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static IncidentQueryMock |
mockIncidentQuery(org.camunda.bpm.engine.RuntimeService serviceMock) |
static JobDefinitionQueryMock |
mockJobDefinitionQuery(org.camunda.bpm.engine.ManagementService serviceMock) |
static JobQueryMock |
mockJobQuery(org.camunda.bpm.engine.ManagementService serviceMock) |
static ProcessDefinitionQueryMock |
mockProcessDefinitionQuery(org.camunda.bpm.engine.RepositoryService serviceMock) |
static ProcessDefinitionStatisticsQueryMock |
mockProcessDefinitionStatisticsQuery(org.camunda.bpm.engine.ManagementService serviceMock) |
static ProcessInstanceQueryMock |
mockProcessInstanceQuery(org.camunda.bpm.engine.RuntimeService serviceMock) |
static TaskQueryMock |
mockTaskQuery(org.camunda.bpm.engine.TaskService serviceMock) |
static TenantQueryMock |
mockTenantQuery(org.camunda.bpm.engine.IdentityService serviceMock) |
static UserOperationLogQueryMock |
mockUserOperationLogQuery(org.camunda.bpm.engine.HistoryService serviceMock) |
static UserQueryMock |
mockUserQuery(org.camunda.bpm.engine.IdentityService serviceMock) |
static VariableInstanceQueryMock |
mockVariableInstanceQuery(org.camunda.bpm.engine.RuntimeService serviceMock) |
static CallActivityMock |
registerCallActivityMock(String processDefinitionKey) |
static FluentExecutionListenerMock |
registerExecutionListenerMock(Class<? extends org.camunda.bpm.engine.delegate.ExecutionListener> type)
Registers a new FluentExecutionListenerMock instance for name (by type).
|
static FluentExecutionListenerMock |
registerExecutionListenerMock(String name)
Registers a new FluentExecutionListenerMock instance for name.
|
static <T> T |
registerInstance(String name,
T instance)
Delegates to
Mocks.register(String, Object) |
static <T> T |
registerInstance(T instance)
If you already have the instance, register it directly.
|
static void |
registerInstancesForFields(Object instance)
Registers mocks via
Mocks.register(String, Object) for
all attributes with Named-types. |
static FluentJavaDelegateMock |
registerJavaDelegateMock(Class<? extends org.camunda.bpm.engine.delegate.JavaDelegate> type)
Registers a new FluentJavaDelegateMock instance for name (by type).
|
static FluentJavaDelegateMock |
registerJavaDelegateMock(String name)
Registers a new FluentJavaDelegateMock instance for name.
|
static <T> T |
registerMockInstance(Class<T> type)
Creates a mock for the given type and registers it.
|
static <T> T |
registerMockInstance(String name,
Class<T> type)
Creates a mock for the given type and registers it.
|
static void |
registerMockInstances(Class<?>... types)
Creates and registers mock instance for every given type.
|
static void |
registerMockInstances(Collection<Class<?>> types)
Creates and registers mock instance for every given type.
|
static void |
registerMockInstancesForNestedTypes(Class<?> parentClass)
Registers mock instances for every public static nested class found in
parentClass.
|
static <T> T |
registerNewInstance(Class<T> type)
Creates a new instance for the given type using the default constructor and
registers it.
|
static <T> T |
registerNewInstance(String name,
Class<T> type)
Creates a new instance for the given type and registers it under the given
name.
|
static void |
registerNewInstancesForNestedTypes(Class<?> parentClass)
Registers new instances for every public static nested class found in
parentClass.
|
static FluentTaskListenerMock |
registerTaskListenerMock(Class<? extends org.camunda.bpm.engine.delegate.TaskListener> type)
Registers a new FluentTaskListenerMock instance for name (by type).
|
static FluentTaskListenerMock |
registerTaskListenerMock(String name)
Registers a new FluentTaskListenerMock instance for name.
|
static void |
reset() |
static RuntimeServiceFluentMock |
runtimeServiceFluentMock() |
static RuntimeServiceFluentMock |
runtimeServiceFluentMock(org.camunda.bpm.engine.RuntimeService runtimeServiceMock) |
static CamundaMockito |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CamundaMockito[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static VariableScopeFake |
variableScopeFake() |
static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> |
verifyExecutionListenerMock(Class<?> type)
Gets the registered FluentExecutionListenerMock and creates a verification
instance.
|
static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> |
verifyExecutionListenerMock(FluentExecutionListenerMock fluentExecutionListenerMock)
Creates a verification instance for ExecutionListener.
|
static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> |
verifyExecutionListenerMock(String name)
Gets the registered FluentExecutionListenerMock and creates a verification
instance.
|
static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> |
verifyJavaDelegateMock(Class<?> type)
Gets the registered FluentJavaDelegateMock and creates a verification
instance.
|
static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> |
verifyJavaDelegateMock(FluentJavaDelegateMock fluentJavaDelegateMock)
Creates a verification instance for JavaDelegate.
|
static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> |
verifyJavaDelegateMock(String name)
Gets the registered FluentJavaDelegateMock and creates a verification
instance.
|
static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> |
verifyTaskListenerMock(Class<?> type)
Gets the registered FluentExecutionListenerMock and creates a verification
instance.
|
static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> |
verifyTaskListenerMock(FluentTaskListenerMock fluentTaskListenerMock)
Creates a verification instance for TaskListener.
|
static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> |
verifyTaskListenerMock(String name)
Gets the registered FluentTaskListenerMock and creates a verification
instance.
|
public static CamundaMockito[] values()
for (CamundaMockito c : CamundaMockito.values()) System.out.println(c);
public static CamundaMockito valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static void autoMock(@Nonnull String bpmnFileResource)
bpmnFileResource - the bpm file resource to parseautoMock(java.net.URL)public static void autoMock(@Nonnull URL bpmnFile)
This is an auto-mock feature that allows the process to run. If you need to modify the behavior of the mock, you can use the getXXX() methods to access it by its name.
bpmnFile - the BPMN resource to parsepublic static FluentJavaDelegateMock registerJavaDelegateMock(String name)
name - the name under which the instance is registeredExpressions.registerInstance(String,
Object)public static FluentJavaDelegateMock registerJavaDelegateMock(Class<? extends org.camunda.bpm.engine.delegate.JavaDelegate> type)
type - the type to registerpublic static FluentExecutionListenerMock registerExecutionListenerMock(String name)
name - the name under which the instance is registeredExpressions.registerInstance(String,
Object)public static FluentExecutionListenerMock registerExecutionListenerMock(Class<? extends org.camunda.bpm.engine.delegate.ExecutionListener> type)
type - the type to registerpublic static FluentTaskListenerMock registerTaskListenerMock(String name)
name - the name under which the instance is registeredExpressions.registerInstance(String,
Object)public static FluentTaskListenerMock registerTaskListenerMock(Class<? extends org.camunda.bpm.engine.delegate.TaskListener> type)
type - the type to registerpublic static FluentJavaDelegateMock getJavaDelegateMock(String name)
name - the name under which the instance is registeredExpressions.getRegistered(String)public static FluentJavaDelegateMock getJavaDelegateMock(Class<?> type)
public static FluentExecutionListenerMock getExecutionListenerMock(String name)
name - the name under which the instance is registeredExpressions.getRegistered(String)public static FluentExecutionListenerMock getExecutionListenerMock(Class<?> type)
public static FluentTaskListenerMock getTaskListenerMock(String name)
name - the name under which the instance is registeredExpressions.getRegistered(String)public static FluentTaskListenerMock getTaskListenerMock(Class<?> type)
public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyJavaDelegateMock(String name)
name - the name under which the instance is registeredverifyJavaDelegateMock(org.camunda.bpm.extension.mockito.mock.FluentJavaDelegateMock)public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyJavaDelegateMock(Class<?> type)
type - the type of the delegate to lookuppublic static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyJavaDelegateMock(FluentJavaDelegateMock fluentJavaDelegateMock)
fluentJavaDelegateMock - the fluent-mock instancepublic static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyExecutionListenerMock(String name)
name - the name under which the instance is registeredverifyJavaDelegateMock(org.camunda.bpm.extension.mockito.mock.FluentJavaDelegateMock)public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyExecutionListenerMock(Class<?> type)
type - the type of the listener to lookuppublic static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyExecutionListenerMock(FluentExecutionListenerMock fluentExecutionListenerMock)
fluentExecutionListenerMock - the fluent-mock instancepublic static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> verifyTaskListenerMock(String name)
name - the name under which the instance is registeredverifyJavaDelegateMock(org.camunda.bpm.extension.mockito.mock.FluentJavaDelegateMock)public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> verifyTaskListenerMock(Class<?> type)
type - the type of the listener to lookuppublic static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> verifyTaskListenerMock(FluentTaskListenerMock fluentTaskListenerMock)
fluentTaskListenerMock - the fluent-mock instancepublic static void registerMockInstancesForNestedTypes(Class<?> parentClass)
parentClass - the parentClass to scan for nested public static typespublic static void registerInstancesForFields(Object instance)
Mocks.register(String, Object) for
all attributes with Named-types.instance - instance who's fields are registered (maybe Junit test or jbehave
steps).public static void registerNewInstancesForNestedTypes(Class<?> parentClass)
parentClass - the parentClass to scan for nested public static typespublic static void registerMockInstances(Class<?>... types)
types - collection of types to mock and registerregisterMockInstances(java.util.Collection)public static void registerMockInstances(Collection<Class<?>> types)
types - collection of types to mock and registerpublic static <T> T registerMockInstance(String name, Class<T> type)
name - the juel name under which the mock is registeredtype - the type of the mock to createpublic static <T> T registerMockInstance(Class<T> type)
type - the type of the mock to createpublic static <T> T registerNewInstance(String name, Class<T> type)
name - the name for the registered instancetype - the type of the instance to createpublic static <T> T registerNewInstance(Class<T> type)
type - the type of the instance to createregisterNewInstance(String, Class)public static <T> T registerInstance(T instance)
NameForType.instance - the instance or mock to registerpublic static <T> T registerInstance(String name, T instance)
Mocks.register(String, Object)name - the juel name for the registered instanceinstance - the instance to registerpublic static <T> T getRegistered(String name)
name - juel name of the registered instance or mockpublic static <T> T getRegistered(Class<?> type)
type - the type of the registered instance or mockpublic static void reset()
Mocks.reset()public static FilterQueryMock mockFilterQuery(org.camunda.bpm.engine.FilterService serviceMock)
public static TaskQueryMock mockTaskQuery(org.camunda.bpm.engine.TaskService serviceMock)
public static CaseInstanceQueryMock mockCaseInstanceQuery(org.camunda.bpm.engine.CaseService serviceMock)
public static CaseExecutionQueryMock mockCaseExecutionQuery(org.camunda.bpm.engine.CaseService serviceMock)
public static ExecutionQueryMock mockExecutionQuery(org.camunda.bpm.engine.RuntimeService serviceMock)
public static ProcessInstanceQueryMock mockProcessInstanceQuery(org.camunda.bpm.engine.RuntimeService serviceMock)
public static IncidentQueryMock mockIncidentQuery(org.camunda.bpm.engine.RuntimeService serviceMock)
public static EventSubscriptionQueryMock mockEventSubscriptionQuery(org.camunda.bpm.engine.RuntimeService serviceMock)
public static VariableInstanceQueryMock mockVariableInstanceQuery(org.camunda.bpm.engine.RuntimeService serviceMock)
public static ProcessDefinitionQueryMock mockProcessDefinitionQuery(org.camunda.bpm.engine.RepositoryService serviceMock)
public static CaseDefinitionQueryMock mockCaseDefinitionQuery(org.camunda.bpm.engine.RepositoryService serviceMock)
public static DecisionDefinitionQueryMock mockDecisionDefinitionQuery(org.camunda.bpm.engine.RepositoryService serviceMock)
public static DeploymentQueryMock mockDeploymentQuery(org.camunda.bpm.engine.RepositoryService serviceMock)
public static HistoricIdentityLinkLogQueryMock mockHistoricIdentityLinkLogQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricProcessInstanceQueryMock mockHistoricProcessInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricActivityStatisticsQueryMock mockHistoricActivityStatisticsQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricVariableInstanceQueryMock mockHistoricVariableInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricCaseActivityInstanceQueryMock mockHistoricCaseActivityInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricDecisionInstanceQueryMock mockHistoricDecisionInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricTaskInstanceQueryMock mockHistoricTaskInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricDetailQueryMock mockHistoricDetailQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static UserOperationLogQueryMock mockUserOperationLogQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricIncidentQueryMock mockHistoricIncidentQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricCaseInstanceQueryMock mockHistoricCaseInstanceQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricJobLogQueryMock mockHistoricJobLogQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static HistoricBatchQueryMock mockHistoricBatchQuery(org.camunda.bpm.engine.HistoryService serviceMock)
public static UserQueryMock mockUserQuery(org.camunda.bpm.engine.IdentityService serviceMock)
public static GroupQueryMock mockGroupQuery(org.camunda.bpm.engine.IdentityService serviceMock)
public static TenantQueryMock mockTenantQuery(org.camunda.bpm.engine.IdentityService serviceMock)
public static JobQueryMock mockJobQuery(org.camunda.bpm.engine.ManagementService serviceMock)
public static BatchQueryMock mockBatchQuery(org.camunda.bpm.engine.ManagementService serviceMock)
public static ProcessDefinitionStatisticsQueryMock mockProcessDefinitionStatisticsQuery(org.camunda.bpm.engine.ManagementService serviceMock)
public static JobDefinitionQueryMock mockJobDefinitionQuery(org.camunda.bpm.engine.ManagementService serviceMock)
public static DeploymentStatisticsQueryMock mockDeploymentStatisticsQuery(org.camunda.bpm.engine.ManagementService serviceMock)
public static ActivityStatisticsQueryMock mockActivityStatisticsQuery(org.camunda.bpm.engine.ManagementService serviceMock)
public static BatchStatisticsQueryMock mockBatchStatisticsQuery(org.camunda.bpm.engine.ManagementService serviceMock)
public static AuthorizationQueryMock mockAuthorizationQuery(org.camunda.bpm.engine.AuthorizationService serviceMock)
public static ExternalTaskQueryMock mockExternalTaskQuery(org.camunda.bpm.engine.ExternalTaskService serviceMock)
public static VariableScopeFake variableScopeFake()
public static DelegateExecutionFake delegateExecutionFake()
public static DelegateCaseExecutionFake delegateCaseExecutionFake()
public static DelegateCaseVariableInstanceFake delegateCaseVariableInstanceFake()
public static DelegateTaskFake delegateTaskFake()
public static Set<String> candidateUserIds(org.camunda.bpm.engine.delegate.DelegateTask task)
public static Set<String> candidateGroupIds(org.camunda.bpm.engine.delegate.DelegateTask task)
public static CallActivityMock registerCallActivityMock(String processDefinitionKey)
public static RuntimeServiceFluentMock runtimeServiceFluentMock()
public static RuntimeServiceFluentMock runtimeServiceFluentMock(org.camunda.bpm.engine.RuntimeService runtimeServiceMock)
Copyright © 2020 Camunda Services GmbH. All rights reserved.