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
engineFields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCaseAssert(ProcessEngine engine, A actual, Class<?> selfType) -
Method Summary
Modifier and TypeMethodDescriptionprotected CaseExecutionAssertcaseExecution(CaseExecutionQuery query) Retrieve a childCaseExecutioncurrently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected CaseExecutionQueryCaseExecutionQuery, automatically narrowed toCaseInstanceof actualCaseExecutionprotected CaseTaskAssertEnter 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 CaseExecutionAssertRetrieve any descendantCaseExecutioncurrently available in the context of the actual caseInstance under test of this AbstractCaseAssert.Delivers the the actual object under test.protected ARetrieve refreshed status of object under test from runtime databaseprotected intprotected Sprotected HistoricCaseActivityInstanceQueryHistoricCaseActivityInstanceQuery, automatically narrowed toCaseInstanceof actualCaseExecutionprotected HumanTaskAssertEnter 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 SVerifies the expectation that theCaseExecutionis 'available'.protected CaseInstanceAssertVerifies the expectation that theCaseExecutionis the 'case' instance.protected CaseTaskAssertVerifies 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 SVerifies the expectation that theCaseExecutionis 'completed'.protected SVerifies the expectation that theCaseExecutionis 'disabled'.protected SVerifies the expectation that theCaseExecutionis 'enabled'.protected HumanTaskAssertVerifies the expectation that theCaseExecutionis a 'humanTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected MilestoneAssertVerifies the expectation that theCaseExecutionis a 'milestone' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected ProcessTaskAssertVerifies 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 SVerifies the expectation that theCaseExecutionis 'terminated'.protected MilestoneAssertEnter 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(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 StageAssertEnter 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 StringEnter into a chained map assert inspecting the variables currently available in the context of the case instance under test of this AbstractCaseAssert.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, taskServiceMethods 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, withThreadDumpOnErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs
-
Constructor Details
-
AbstractCaseAssert
-
-
Method Details
-
getActual
Delivers the the actual object under test.- Overrides:
getActualin classAbstractProcessAssert<S extends AbstractCaseAssert<S,A>, A extends CaseExecution>
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
-
descendantCaseExecution
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:
-
humanTask
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
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
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
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
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
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
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
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
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
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
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
CaseExecutionQuery, automatically narrowed toCaseInstanceof actualCaseExecution- Overrides:
caseExecutionQueryin classAbstractProcessAssert<S extends AbstractCaseAssert<S,A>, A extends CaseExecution>
-
historicCaseActivityInstanceQuery
HistoricCaseActivityInstanceQuery, automatically narrowed toCaseInstanceof actualCaseExecution- Overrides:
historicCaseActivityInstanceQueryin classAbstractProcessAssert<S extends AbstractCaseAssert<S,A>, A extends CaseExecution>
-
toString
- Specified by:
toStringin classAbstractProcessAssert<S extends AbstractCaseAssert<S,A>, A extends CaseExecution>
-
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
-
hasVars
-