Class AbstractCaseAssert<S extends AbstractCaseAssert<S,A>,A extends 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 CaseExecution> extends AbstractProcessAssert<S,A>
-
-
Field Summary
-
Fields inherited from class org.camunda.bpm.engine.test.assertions.bpmn.AbstractProcessAssert
engine
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCaseAssert(ProcessEngine engine, A actual, java.lang.Class<?> selfType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CaseExecutionAssertcaseExecution(CaseExecutionQuery query)Retrieve a childCaseExecutioncurrently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected CaseExecutionQuerycaseExecutionQuery()CaseExecutionQuery, automatically narrowed toCaseInstanceof actualCaseExecutionprotected CaseTaskAssertcaseTask(java.lang.String activityId)Enter into a chainedCaseTaskAssertinspecting the one and mostly one 'caseTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected CaseTaskAssertcaseTask(CaseExecutionQuery query)Enter into a chainedCaseTaskAssertinspecting the one and mostly one 'caseTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected CaseExecutionAssertdescendantCaseExecution(CaseExecutionQuery query)Retrieve any descendantCaseExecutioncurrently available in the context of the actual caseInstance under test of this AbstractCaseAssert.AgetActual()Delivers the the actual object under test.protected AgetCurrent()Retrieve refreshed status of object under test from runtime databaseprotected intgetHistoricState()protected ShasVars(java.lang.String[] names)protected HistoricCaseActivityInstanceQueryhistoricCaseActivityInstanceQuery()HistoricCaseActivityInstanceQuery, automatically narrowed toCaseInstanceof actualCaseExecutionprotected HumanTaskAsserthumanTask(java.lang.String activityId)Enter into a chainedHumanTaskAssertinspecting the one and mostly one 'humanTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected HumanTaskAsserthumanTask(CaseExecutionQuery query)Enter into a chainedHumanTaskAssertinspecting the one and mostly one 'humanTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected SisActive()Verifies the expectation that theCaseExecutionis 'active'.protected SisAvailable()Verifies the expectation that theCaseExecutionis 'available'.protected CaseInstanceAssertisCaseInstance()Verifies the expectation that theCaseExecutionis the 'case' instance.protected CaseTaskAssertisCaseTask()Verifies the expectation that theCaseExecutionis a 'caseTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected SisClosed()Verifies the expectation that theCaseExecutionis 'closed'.protected SisCompleted()Verifies the expectation that theCaseExecutionis 'completed'.protected SisDisabled()Verifies the expectation that theCaseExecutionis 'disabled'.protected SisEnabled()Verifies the expectation that theCaseExecutionis 'enabled'.protected HumanTaskAssertisHumanTask()Verifies the expectation that theCaseExecutionis a 'humanTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected MilestoneAssertisMilestone()Verifies the expectation that theCaseExecutionis a 'milestone' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected ProcessTaskAssertisProcessTask()Verifies the expectation that theCaseExecutionis a 'processTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected StageAssertisStage()Verifies the expectation that theCaseExecutionis a 'stage' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected SisTerminated()Verifies the expectation that theCaseExecutionis 'terminated'.protected MilestoneAssertmilestone(java.lang.String activityId)Enter into a chainedMilestoneAssertinspecting the one and mostly one 'milestone' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected MilestoneAssertmilestone(CaseExecutionQuery query)Enter into a chainedMilestoneAssertinspecting the one and mostly one 'milestone' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected ProcessTaskAssertprocessTask(java.lang.String activityId)Enter into a chainedProcessTaskAssertinspecting the one and mostly one 'processTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected ProcessTaskAssertprocessTask(CaseExecutionQuery query)Enter into a chainedProcessTaskAssertinspecting the one and mostly one 'processTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected StageAssertstage(java.lang.String activityId)Enter into a chainedStageAssertinspecting the one and mostly one 'stage' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected StageAssertstage(CaseExecutionQuery query)Enter into a chainedStageAssertinspecting the one and mostly one 'stage' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected java.lang.StringtoString(A caseExecution)protected org.assertj.core.api.MapAssert<java.lang.String,java.lang.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.protected java.util.Map<java.lang.String,java.lang.Object>vars()-
Methods inherited from class org.camunda.bpm.engine.test.assertions.bpmn.AbstractProcessAssert
caseDefinitionQuery, caseInstanceQuery, caseService, executionQuery, externalTaskQuery, externalTaskService, formService, getExistingCurrent, getLastAssert, historicActivityInstanceQuery, historicProcessInstanceQuery, historicVariableInstanceQuery, historyService, jobQuery, managementService, processDefinitionQuery, processInstanceQuery, repositoryService, resetLastAsserts, runtimeService, taskQuery, taskService
-
Methods inherited from class org.assertj.core.api.AbstractAssert
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, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
-
-
-
-
Constructor Detail
-
AbstractCaseAssert
protected AbstractCaseAssert(ProcessEngine engine, A actual, java.lang.Class<?> selfType)
-
-
Method Detail
-
getActual
public A getActual()
Delivers the the actual object under test.- Overrides:
getActualin classAbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends CaseExecution>
-
isAvailable
protected S isAvailable()
Verifies the expectation that theCaseExecutionis '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 theCaseExecutionis '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 theCaseExecutionis '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 theCaseExecutionis '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 theCaseExecutionis '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 theCaseExecutionis '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 theCaseExecutionis '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 theCaseExecutionis 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 theCaseExecutionis 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 theCaseExecutionis 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 theCaseExecutionis 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 theCaseExecutionis 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 theCaseExecutionis 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(CaseExecutionQuery query)
Retrieve a childCaseExecutioncurrently 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)- See Also:
to find grandchilds and other descendants, too.
-
descendantCaseExecution
protected CaseExecutionAssert descendantCaseExecution(CaseExecutionQuery query)
Retrieve any descendantCaseExecutioncurrently 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)- See Also:
to find only children of this
-
humanTask
protected HumanTaskAssert humanTask(CaseExecutionQuery query)
Enter into a chainedHumanTaskAssertinspecting 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
humanTask
protected HumanTaskAssert humanTask(java.lang.String activityId)
Enter into a chainedHumanTaskAssertinspecting 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
caseTask
protected CaseTaskAssert caseTask(CaseExecutionQuery query)
Enter into a chainedCaseTaskAssertinspecting 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
caseTask
protected CaseTaskAssert caseTask(java.lang.String activityId)
Enter into a chainedCaseTaskAssertinspecting 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
processTask
protected ProcessTaskAssert processTask(CaseExecutionQuery query)
Enter into a chainedProcessTaskAssertinspecting 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
processTask
protected ProcessTaskAssert processTask(java.lang.String activityId)
Enter into a chainedProcessTaskAssertinspecting 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
stage
protected StageAssert stage(CaseExecutionQuery query)
Enter into a chainedStageAssertinspecting 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
stage
protected StageAssert stage(java.lang.String activityId)
Enter into a chainedStageAssertinspecting 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
milestone
protected MilestoneAssert milestone(CaseExecutionQuery query)
Enter into a chainedMilestoneAssertinspecting 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:
ProcessEngineException- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
milestone
protected MilestoneAssert milestone(java.lang.String activityId)
Enter into a chainedMilestoneAssertinspecting 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:
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:
getCurrentin classAbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends CaseExecution>
-
getHistoricState
protected int getHistoricState()
- Returns:
- historic state for the object under test from history database
-
caseExecutionQuery
protected CaseExecutionQuery caseExecutionQuery()
CaseExecutionQuery, automatically narrowed toCaseInstanceof actualCaseExecution- Overrides:
caseExecutionQueryin classAbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends CaseExecution>
-
historicCaseActivityInstanceQuery
protected HistoricCaseActivityInstanceQuery historicCaseActivityInstanceQuery()
HistoricCaseActivityInstanceQuery, automatically narrowed toCaseInstanceof actualCaseExecution- Overrides:
historicCaseActivityInstanceQueryin classAbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends CaseExecution>
-
toString
protected java.lang.String toString(A caseExecution)
- Specified by:
toStringin classAbstractProcessAssert<S extends AbstractCaseAssert<S,A>,A extends CaseExecution>
-
variables
protected org.assertj.core.api.MapAssert<java.lang.String,java.lang.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 java.util.Map<java.lang.String,java.lang.Object> vars()
-
hasVars
protected S hasVars(java.lang.String[] names)
-
-