org.camunda.bpm.engine.test.assertions.cmmn
Class CmmnAwareTests

java.lang.Object
  extended by org.assertj.core.api.Assertions
      extended by org.camunda.bpm.engine.test.assertions.bpmn.AbstractAssertions
          extended by org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions
              extended by org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests
                  extended by org.camunda.bpm.engine.test.assertions.cmmn.CmmnAwareTests
Direct Known Subclasses:
ProcessEngineTests

public class CmmnAwareTests
extends BpmnAwareTests

Convenience class to access camunda *BPMN* and *CMMN* related Assertions PLUS helper methods. Use it with a static import: import static org.camunda.bpm.engine.test.assertions.cmmn.CmmnAwareTests.*;

Author:
Martin Schimak , Martin Günther , Malte Sörensen

Constructor Summary
CmmnAwareTests()
           
 
Method Summary
static CaseDefinitionAssert assertThat(org.camunda.bpm.engine.repository.CaseDefinition actual)
          Assert that...
static CaseExecutionAssert assertThat(org.camunda.bpm.engine.runtime.CaseExecution actual)
          Assert that...
static CaseInstanceAssert assertThat(org.camunda.bpm.engine.runtime.CaseInstance actual)
          Assert that...
static org.camunda.bpm.engine.repository.CaseDefinitionQuery caseDefinitionQuery()
          Helper method to easily create a new CaseDefinitionQuery.
static org.camunda.bpm.engine.runtime.CaseExecution caseExecution(org.camunda.bpm.engine.runtime.CaseExecutionQuery caseExecutionQuery, org.camunda.bpm.engine.runtime.CaseInstance caseInstance)
          Helper method to find any CaseExecution in the context of a CaseInstance
static org.camunda.bpm.engine.runtime.CaseExecution caseExecution(String activityId, org.camunda.bpm.engine.runtime.CaseInstance caseInstance)
          Helper method to find any CaseExecution in the context of a CaseInstance.
static org.camunda.bpm.engine.runtime.CaseExecutionQuery caseExecutionQuery()
          Helper method to easily create a new CaseExecutionQuery.
static org.camunda.bpm.engine.runtime.CaseInstanceQuery caseInstanceQuery()
          Helper method to easily create a new CaseInstanceQuery.
static org.camunda.bpm.engine.CaseService caseService()
          Helper method to easily access CaseService
static void complete(org.camunda.bpm.engine.runtime.CaseExecution caseExecution)
          Helper method to easily complete a CaseExecution.
static void complete(org.camunda.bpm.engine.runtime.CaseExecution caseExecution, Map<String,Object> variables)
          Helper method to easily complete a caseExecution and pass some case variables.
static void disable(org.camunda.bpm.engine.runtime.CaseExecution caseExecution)
          Helper method to easily disable a case execution.
static void manuallyStart(org.camunda.bpm.engine.runtime.CaseExecution caseExecution)
          Helper method to manually start a case execution.
static Map<String,Object> withVariables(String key, Object value, Object... furtherKeyValuePairs)
          Helper method to easily construct a map of case variables
 
Methods inherited from class org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests
authorizationService, calledProcessInstance, calledProcessInstance, calledProcessInstance, calledProcessInstance, calledProcessInstance, calledProcessInstance, claim, complete, complete, execute, executionQuery, formService, historyService, identityService, job, job, job, job, job, job, jobQuery, managementService, processDefinition, processDefinition, processDefinition, processDefinition, processDefinitionQuery, processInstanceQuery, repositoryService, runtimeService, task, task, task, task, task, task, taskQuery, taskService, unclaim
 
Methods inherited from class org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions
assertThat, assertThat, assertThat, assertThat
 
Methods inherited from class org.camunda.bpm.engine.test.assertions.bpmn.AbstractAssertions
assertApi, init, processEngine, reset, supportsApi
 
Methods inherited from class org.assertj.core.api.Assertions
allOf, allOf, anyOf, anyOf, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, atIndex, contentOf, contentOf, contentOf, doesNotHave, entry, extractProperty, extractProperty, fail, fail, failBecauseExceptionWasNotThrown, filter, filter, linesOf, linesOf, linesOf, not, offset, offset, registerCustomDateFormat, registerCustomDateFormat, setAllowExtractingPrivateFields, setRemoveAssertJRelatedElementsFromStackTrace, tuple, useDateFormat, useDateFormat, useDefaultDateFormats, useDefaultDateFormatsOnly, useIsoDateFormat, useIsoDateTimeFormat, useIsoDateTimeWithMsFormat, within, within, within
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmmnAwareTests

public CmmnAwareTests()
Method Detail

assertThat

public static CaseInstanceAssert assertThat(org.camunda.bpm.engine.runtime.CaseInstance actual)
Assert that... the given CaseInstance meets your expectations.

Parameters:
actual - CaseInstance under test
Returns:
Assert object offering CaseInstance specific assertions.

assertThat

public static CaseExecutionAssert assertThat(org.camunda.bpm.engine.runtime.CaseExecution actual)
Assert that... the given CaseExecution meets your expectations.

Parameters:
actual - CaseExecution under test
Returns:
Assert object offering CaseExecution specific assertions.

assertThat

public static CaseDefinitionAssert assertThat(org.camunda.bpm.engine.repository.CaseDefinition actual)
Assert that... the given CaseDefinition meets your expectations.

Parameters:
actual - ProcessDefinition under test
Returns:
Assert object offering ProcessDefinition specific assertions.

caseService

public static org.camunda.bpm.engine.CaseService caseService()
Helper method to easily access CaseService

Returns:
CaseService of process engine bound to this testing thread
See Also:
CaseService

caseInstanceQuery

public static org.camunda.bpm.engine.runtime.CaseInstanceQuery caseInstanceQuery()
Helper method to easily create a new CaseInstanceQuery.

Returns:
new CaseInstanceQuery for process engine bound to this testing thread

caseExecutionQuery

public static org.camunda.bpm.engine.runtime.CaseExecutionQuery caseExecutionQuery()
Helper method to easily create a new CaseExecutionQuery.

Returns:
new CaseExecutionQuery for process engine bound to this testing thread

caseDefinitionQuery

public static org.camunda.bpm.engine.repository.CaseDefinitionQuery caseDefinitionQuery()
Helper method to easily create a new CaseDefinitionQuery.

Returns:
new CaseExecutionQuery for process engine bound to this testing thread

complete

public static void complete(org.camunda.bpm.engine.runtime.CaseExecution caseExecution)
Helper method to easily complete a CaseExecution.

Parameters:
caseExecution - the CaseExecution to complete

disable

public static void disable(org.camunda.bpm.engine.runtime.CaseExecution caseExecution)
Helper method to easily disable a case execution.

Parameters:
caseExecution - the case execution to complete

manuallyStart

public static void manuallyStart(org.camunda.bpm.engine.runtime.CaseExecution caseExecution)
Helper method to manually start a case execution.

Parameters:
caseExecution - the case execution to start

caseExecution

public static org.camunda.bpm.engine.runtime.CaseExecution caseExecution(String activityId,
                                                                         org.camunda.bpm.engine.runtime.CaseInstance caseInstance)
Helper method to find any CaseExecution in the context of a CaseInstance.

Parameters:
activityId - activity to find
caseInstance - CaseInstance to search in
Returns:
CaseExecution or null

caseExecution

public static org.camunda.bpm.engine.runtime.CaseExecution caseExecution(org.camunda.bpm.engine.runtime.CaseExecutionQuery caseExecutionQuery,
                                                                         org.camunda.bpm.engine.runtime.CaseInstance caseInstance)
Helper method to find any CaseExecution in the context of a CaseInstance

Parameters:
caseExecutionQuery - query for narrowing down on the CaseExecution to find
caseInstance - CaseInstance to search in
Returns:
CaseExecution or null

complete

public static void complete(org.camunda.bpm.engine.runtime.CaseExecution caseExecution,
                            Map<String,Object> variables)
Helper method to easily complete a caseExecution and pass some case variables.

Parameters:
caseExecution - CaseExecution to be completed
variables - Case variables to be passed to the case instance when completing the caseExecution. For setting those variables, you can use withVariables(String, Object, Object...)

withVariables

public static Map<String,Object> withVariables(String key,
                                               Object value,
                                               Object... furtherKeyValuePairs)
Helper method to easily construct a map of case variables

Parameters:
key - (obligatory) key of first case variable
value - (obligatory) value of first case variable
furtherKeyValuePairs - (optional) key/value pairs for further case variables
Returns:
a map of case variables by passing a list of String -> Object key value pairs.


Copyright © 2016 camunda services GmbH. All rights reserved.