org.camunda.bpm.engine.test.assertions
Class ProcessEngineAssertions

java.lang.Object
  extended by org.assertj.core.api.Assertions
      extended by org.camunda.bpm.engine.test.assertions.ProcessEngineAssertions
Direct Known Subclasses:
ProcessEngineTests

public class ProcessEngineAssertions
extends org.assertj.core.api.Assertions

Class meant to statically access all camunda BPM Process Engine Assertions.

In your code use import static org.camunda.bpm.engine.test.assertions.ProcessEngineAssertions.*;

Author:
Martin Schimak

Method Summary
static JobAssert assertThat(org.camunda.bpm.engine.runtime.Job actual)
          Assert that... the given Job meets your expecations.
static ProcessDefinitionAssert assertThat(org.camunda.bpm.engine.repository.ProcessDefinition actual)
          Assert that... the given ProcessDefinition meets your expecations.
static ProcessInstanceAssert assertThat(org.camunda.bpm.engine.runtime.ProcessInstance actual)
          Assert that... the given ProcessInstance meets your expecations.
static TaskAssert assertThat(org.camunda.bpm.engine.task.Task actual)
          Assert that... the given Task meets your expecations.
static void init(org.camunda.bpm.engine.ProcessEngine processEngine)
          Bind an instance of ProcessEngine to the current testing calls done in your test method.
static org.camunda.bpm.engine.ProcessEngine processEngine()
          Retrieve the processEngine bound to the current testing thread via calling init(ProcessEngine processEngine).
static void reset()
          Resets operations done via calling init(ProcessEngine processEngine) to its clean state - just as before calling init() for the first time.
 
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

processEngine

public static org.camunda.bpm.engine.ProcessEngine processEngine()
Retrieve the processEngine bound to the current testing thread via calling init(ProcessEngine processEngine). In case no such processEngine is bound yet, init(processEngine) is called with a default process engine.

Returns:
processEngine bound to the current testing thread
Throws:
IllegalStateException - in case a processEngine has not been initialised yet and cannot be initialised with a default engine.

init

public static void init(org.camunda.bpm.engine.ProcessEngine processEngine)
Bind an instance of ProcessEngine to the current testing calls done in your test method.

Parameters:
processEngine - ProcessEngine which should be bound to the current testing thread.

reset

public static void reset()
Resets operations done via calling init(ProcessEngine processEngine) to its clean state - just as before calling init() for the first time.


assertThat

public static ProcessDefinitionAssert assertThat(org.camunda.bpm.engine.repository.ProcessDefinition actual)
Assert that... the given ProcessDefinition meets your expecations.

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

assertThat

public static ProcessInstanceAssert assertThat(org.camunda.bpm.engine.runtime.ProcessInstance actual)
Assert that... the given ProcessInstance meets your expecations.

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

assertThat

public static TaskAssert assertThat(org.camunda.bpm.engine.task.Task actual)
Assert that... the given Task meets your expecations.

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

assertThat

public static JobAssert assertThat(org.camunda.bpm.engine.runtime.Job actual)
Assert that... the given Job meets your expecations.

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


Copyright © 2014 camunda services GmbH. All Rights Reserved.