Class AbstractCaseAssert<S extends AbstractCaseAssert<S,A>,A extends org.camunda.bpm.engine.runtime.CaseExecution>

java.lang.Object
org.assertj.core.api.AbstractAssert<S,A>
org.camunda.bpm.engine.test.assertions.bpmn.AbstractProcessAssert<S,A>
org.camunda.bpm.engine.test.assertions.cmmn.AbstractCaseAssert<S,A>
All Implemented Interfaces:
org.assertj.core.api.Assert<S,A>, org.assertj.core.api.Descriptable<S>, org.assertj.core.api.ExtensionPoints<S,A>
Direct Known Subclasses:
CaseExecutionAssert, CaseInstanceAssert, CaseTaskAssert, HumanTaskAssert, MilestoneAssert, ProcessTaskAssert, StageAssert

public abstract class AbstractCaseAssert<S extends AbstractCaseAssert<S,A>,A extends org.camunda.bpm.engine.runtime.CaseExecution> extends AbstractProcessAssert<S,A>
  • Field Summary

    Fields inherited from class org.camunda.bpm.engine.test.assertions.bpmn.AbstractProcessAssert

    engine

    Fields inherited from class org.assertj.core.api.AbstractAssert

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractCaseAssert(org.camunda.bpm.engine.ProcessEngine engine, A actual, Class<?> selfType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    caseExecution(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
    Retrieve a child CaseExecution currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    protected org.camunda.bpm.engine.runtime.CaseExecutionQuery
    CaseExecutionQuery, automatically narrowed to CaseInstance of actual CaseExecution
    protected CaseTaskAssert
    caseTask(String activityId)
    Enter into a chained CaseTaskAssert inspecting the one and mostly one 'caseTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    protected CaseTaskAssert
    caseTask(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
    Enter into a chained CaseTaskAssert inspecting the one and mostly one 'caseTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    descendantCaseExecution(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
    Retrieve any descendant CaseExecution currently available in the context of the actual caseInstance under test of this AbstractCaseAssert.
    Delivers the the actual object under test.
    protected A
    Retrieve refreshed status of object under test from runtime database
    protected int
     
    protected S
    hasVars(String[] names)
     
    protected org.camunda.bpm.engine.history.HistoricCaseActivityInstanceQuery
    HistoricCaseActivityInstanceQuery, automatically narrowed to CaseInstance of actual CaseExecution
    protected HumanTaskAssert
    humanTask(String activityId)
    Enter into a chained HumanTaskAssert inspecting the one and mostly one 'humanTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    protected HumanTaskAssert
    humanTask(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
    Enter into a chained HumanTaskAssert inspecting the one and mostly one 'humanTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    protected S
    Verifies the expectation that the CaseExecution is 'active'.
    protected S
    Verifies the expectation that the CaseExecution is 'available'.
    Verifies the expectation that the CaseExecution is the 'case' instance.
    protected CaseTaskAssert
    Verifies the expectation that the CaseExecution is a 'caseTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
    protected S
    Verifies the expectation that the CaseExecution is 'closed'.
    protected S
    Verifies the expectation that the CaseExecution is 'completed'.
    protected S
    Verifies the expectation that the CaseExecution is 'disabled'.
    protected S
    Verifies the expectation that the CaseExecution is 'enabled'.
    protected HumanTaskAssert
    Verifies the expectation that the CaseExecution is a 'humanTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
    protected MilestoneAssert
    Verifies the expectation that the CaseExecution is a 'milestone' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
    Verifies the expectation that the CaseExecution is a 'processTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
    protected StageAssert
    Verifies the expectation that the CaseExecution is a 'stage' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
    protected S
    Verifies the expectation that the CaseExecution is 'terminated'.
    protected MilestoneAssert
    milestone(String activityId)
    Enter into a chained MilestoneAssert inspecting the one and mostly one 'milestone' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    protected MilestoneAssert
    milestone(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
    Enter into a chained MilestoneAssert inspecting the one and mostly one 'milestone' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    processTask(String activityId)
    Enter into a chained ProcessTaskAssert inspecting the one and mostly one 'processTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    processTask(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
    Enter into a chained ProcessTaskAssert inspecting the one and mostly one 'processTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    protected StageAssert
    stage(String activityId)
    Enter into a chained StageAssert inspecting the one and mostly one 'stage' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    protected StageAssert
    stage(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
    Enter into a chained StageAssert inspecting the one and mostly one 'stage' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.
    protected String
    toString(A caseExecution)
     
    protected org.assertj.core.api.MapAssert<String,Object>
    Enter into a chained map assert inspecting the variables currently available in the context of the case instance under test of this AbstractCaseAssert.
    protected Map<String,Object>
     

    Methods inherited from class org.assertj.core.api.AbstractAssert

    areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, as, as, describedAs
  • Constructor Details

    • AbstractCaseAssert

      protected AbstractCaseAssert(org.camunda.bpm.engine.ProcessEngine engine, A actual, Class<?> selfType)
  • Method Details

    • getActual

      public A getActual()
      Delivers the the actual object under test.
      Overrides:
      getActual in class AbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends org.camunda.bpm.engine.runtime.CaseExecution>
    • isAvailable

      protected S isAvailable()
      Verifies the expectation that the CaseExecution is 'available'. Change visibility to public for those inheriting classes for whose underlying objects under test this status makes sense
      Returns:
      this
    • isEnabled

      protected S isEnabled()
      Verifies the expectation that the CaseExecution is 'enabled'. Change visibility to public for those inheriting classes for whose underlying objects under test this status makes sense
      Returns:
      this
    • isDisabled

      protected S isDisabled()
      Verifies the expectation that the CaseExecution is 'disabled'. Change visibility to public for those inheriting classes for whose underlying objects under test this status makes sense
      Returns:
      this
    • isActive

      protected S isActive()
      Verifies the expectation that the CaseExecution is 'active'. Change visibility to public for those inheriting classes for whose underlying objects under test this status makes sense
      Returns:
      this
    • isCompleted

      protected S isCompleted()
      Verifies the expectation that the CaseExecution is 'completed'. Change visibility to public for those inheriting classes for whose underlying objects under test this status makes sense
      Returns:
      this
    • isClosed

      protected S isClosed()
      Verifies the expectation that the CaseExecution is 'closed'. Change visibility to public for those inheriting classes for whose underlying objects under test this status makes sense
      Returns:
      this
    • isTerminated

      protected S isTerminated()
      Verifies the expectation that the CaseExecution is 'terminated'. Change visibility to public for those inheriting classes for whose underlying objects under test this status makes sense
      Returns:
      this
    • isCaseInstance

      protected CaseInstanceAssert isCaseInstance()
      Verifies the expectation that the CaseExecution is the 'case' instance. Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
      Returns:
      this
    • isStage

      protected StageAssert isStage()
      Verifies the expectation that the CaseExecution is a 'stage' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
      Returns:
      this
    • isHumanTask

      protected HumanTaskAssert isHumanTask()
      Verifies the expectation that the CaseExecution is a 'humanTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
      Returns:
      this
    • isProcessTask

      protected ProcessTaskAssert isProcessTask()
      Verifies the expectation that the CaseExecution is a 'processTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
      Returns:
      this
    • isCaseTask

      protected CaseTaskAssert isCaseTask()
      Verifies the expectation that the CaseExecution is a 'caseTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
      Returns:
      this
    • isMilestone

      protected MilestoneAssert isMilestone()
      Verifies the expectation that the CaseExecution is a 'milestone' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes sense
      Returns:
      this
    • caseExecution

      protected CaseExecutionAssert caseExecution(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
      Retrieve a child CaseExecution currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion.
      Parameters:
      query - CaseExecutionQuery further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion.
      Returns:
      the only CaseExecution resulting from the given search. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
      See Also:
    • descendantCaseExecution

      protected CaseExecutionAssert descendantCaseExecution(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
      Retrieve any descendant CaseExecution currently available in the context of the actual caseInstance under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion.
      Parameters:
      query - CaseExecutionQuery further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion.
      Returns:
      the only CaseExecution resulting from the given search. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
      See Also:
    • humanTask

      protected HumanTaskAssert humanTask(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
      Enter into a chained HumanTaskAssert inspecting the one and mostly one 'humanTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'humanTask'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      query - CaseExecutionQuery further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'humanTask'.
      Returns:
      the only CaseExecution resulting from the given search. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • humanTask

      protected HumanTaskAssert humanTask(String activityId)
      Enter into a chained HumanTaskAssert inspecting the one and mostly one 'humanTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'humanTask'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      activityId - activity if further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'humanTask'.
      Returns:
      the only CaseExecution with the given activitiy id. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • caseTask

      protected CaseTaskAssert caseTask(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
      Enter into a chained CaseTaskAssert inspecting the one and mostly one 'caseTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'caseTask'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      query - CaseExecutionQuery further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'caseTask'.
      Returns:
      the only CaseExecution resulting from the given search. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • caseTask

      protected CaseTaskAssert caseTask(String activityId)
      Enter into a chained CaseTaskAssert inspecting the one and mostly one 'caseTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'caseTask'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      activityId - activity if further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'caseTask'.
      Returns:
      the only CaseExecution with the given activitiy id. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • processTask

      protected ProcessTaskAssert processTask(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
      Enter into a chained ProcessTaskAssert inspecting the one and mostly one 'processTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'processTask'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      query - CaseExecutionQuery further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'processTask'.
      Returns:
      the only CaseExecution resulting from the given search. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • processTask

      protected ProcessTaskAssert processTask(String activityId)
      Enter into a chained ProcessTaskAssert inspecting the one and mostly one 'processTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'processTask'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      activityId - activity if further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'processTask'.
      Returns:
      the only CaseExecution with the given activitiy id. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • stage

      protected StageAssert stage(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
      Enter into a chained StageAssert inspecting the one and mostly one 'stage' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'stage'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      query - CaseExecutionQuery further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'stage'.
      Returns:
      the only CaseExecution resulting from the given search. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • stage

      protected StageAssert stage(String activityId)
      Enter into a chained StageAssert inspecting the one and mostly one 'stage' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'stage'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      activityId - activity if further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'stage'.
      Returns:
      the only CaseExecution with the given activitiy id. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • milestone

      protected MilestoneAssert milestone(org.camunda.bpm.engine.runtime.CaseExecutionQuery query)
      Enter into a chained MilestoneAssert inspecting the one and mostly one 'milestone' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'milestone'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      query - CaseExecutionQuery further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'milestone'.
      Returns:
      the only CaseExecution resulting from the given search. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • milestone

      protected MilestoneAssert milestone(String activityId)
      Enter into a chained MilestoneAssert inspecting the one and mostly one 'milestone' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert. The query is automatically narrowed down to the actual caseExecution under test of this assertion as well as to the type 'milestone'. Change visibility to public for those inheriting classes for whose underlying objects under test this method makes sense
      Parameters:
      activityId - activity if further narrowing down the search for caseExecutions. The query is automatically narrowed down to the actual 'parent' CaseExecution under test of this assertion as well as to the type 'milestone'.
      Returns:
      the only CaseExecution with the given activitiy id. A 'null' CaseExecution in case no such CaseExecution is available.
      Throws:
      org.camunda.bpm.engine.ProcessEngineException - in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
    • getCurrent

      protected A getCurrent()
      Retrieve refreshed status of object under test from runtime database
      Specified by:
      getCurrent in class AbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends org.camunda.bpm.engine.runtime.CaseExecution>
    • getHistoricState

      protected int getHistoricState()
      Returns:
      historic state for the object under test from history database
    • caseExecutionQuery

      protected org.camunda.bpm.engine.runtime.CaseExecutionQuery caseExecutionQuery()
      CaseExecutionQuery, automatically narrowed to CaseInstance of actual CaseExecution
      Overrides:
      caseExecutionQuery in class AbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends org.camunda.bpm.engine.runtime.CaseExecution>
    • historicCaseActivityInstanceQuery

      protected org.camunda.bpm.engine.history.HistoricCaseActivityInstanceQuery historicCaseActivityInstanceQuery()
      HistoricCaseActivityInstanceQuery, automatically narrowed to CaseInstance of actual CaseExecution
      Overrides:
      historicCaseActivityInstanceQuery in class AbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends org.camunda.bpm.engine.runtime.CaseExecution>
    • toString

      protected String toString(A caseExecution)
      Specified by:
      toString in class AbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends org.camunda.bpm.engine.runtime.CaseExecution>
    • variables

      protected org.assertj.core.api.MapAssert<String,Object> variables()
      Enter into a chained map assert inspecting the variables currently available in the context of the case instance under test of this AbstractCaseAssert.
      Returns:
      MapAssert(String, Object) inspecting the case instance variables. Inspecting an empty map in case no such variables are available.
    • vars

      protected Map<String,Object> vars()
    • hasVars

      protected S hasVars(String[] names)