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
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractCaseAssert
(ProcessEngine engine, A actual, Class<?> selfType) -
Method Summary
Modifier and TypeMethodDescriptionprotected CaseExecutionAssert
caseExecution
(CaseExecutionQuery query) Retrieve a childCaseExecution
currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected CaseExecutionQuery
CaseExecutionQuery, automatically narrowed toCaseInstance
of actualCaseExecution
protected CaseTaskAssert
Enter into a chainedCaseTaskAssert
inspecting the one and mostly one 'caseTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected CaseTaskAssert
caseTask
(CaseExecutionQuery query) Enter into a chainedCaseTaskAssert
inspecting the one and mostly one 'caseTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected CaseExecutionAssert
Retrieve any descendantCaseExecution
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 databaseprotected int
protected S
protected HistoricCaseActivityInstanceQuery
HistoricCaseActivityInstanceQuery, automatically narrowed toCaseInstance
of actualCaseExecution
protected HumanTaskAssert
Enter into a chainedHumanTaskAssert
inspecting the one and mostly one 'humanTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected HumanTaskAssert
humanTask
(CaseExecutionQuery query) Enter into a chainedHumanTaskAssert
inspecting the one and mostly one 'humanTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected S
isActive()
Verifies the expectation that theCaseExecution
is 'active'.protected S
Verifies the expectation that theCaseExecution
is 'available'.protected CaseInstanceAssert
Verifies the expectation that theCaseExecution
is the 'case' instance.protected CaseTaskAssert
Verifies the expectation that theCaseExecution
is a 'caseTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected S
isClosed()
Verifies the expectation that theCaseExecution
is 'closed'.protected S
Verifies the expectation that theCaseExecution
is 'completed'.protected S
Verifies the expectation that theCaseExecution
is 'disabled'.protected S
Verifies the expectation that theCaseExecution
is 'enabled'.protected HumanTaskAssert
Verifies the expectation that theCaseExecution
is a 'humanTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected MilestoneAssert
Verifies the expectation that theCaseExecution
is a 'milestone' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected ProcessTaskAssert
Verifies the expectation that theCaseExecution
is a 'processTask' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected StageAssert
isStage()
Verifies the expectation that theCaseExecution
is a 'stage' Change visibility to public for those inheriting classes for whose underlying objects under test this assertion makes senseprotected S
Verifies the expectation that theCaseExecution
is 'terminated'.protected MilestoneAssert
Enter into a chainedMilestoneAssert
inspecting the one and mostly one 'milestone' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected MilestoneAssert
milestone
(CaseExecutionQuery query) Enter into a chainedMilestoneAssert
inspecting the one and mostly one 'milestone' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected ProcessTaskAssert
processTask
(String activityId) Enter into a chainedProcessTaskAssert
inspecting the one and mostly one 'processTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected ProcessTaskAssert
processTask
(CaseExecutionQuery query) Enter into a chainedProcessTaskAssert
inspecting the one and mostly one 'processTask' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected StageAssert
Enter into a chainedStageAssert
inspecting the one and mostly one 'stage' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected StageAssert
stage
(CaseExecutionQuery query) Enter into a chainedStageAssert
inspecting the one and mostly one 'stage' currently available in the context of the actual caseExecution under test of this AbstractCaseAssert.protected String
Enter 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, taskService
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
-
-
Method Details
-
getActual
Delivers the the actual object under test.- Overrides:
getActual
in classAbstractProcessAssert<S extends AbstractCaseAssert<S,
A>, A extends CaseExecution>
-
isAvailable
Verifies the expectation that theCaseExecution
is '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 theCaseExecution
is '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 theCaseExecution
is '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 theCaseExecution
is '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 theCaseExecution
is '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 theCaseExecution
is '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 theCaseExecution
is '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 theCaseExecution
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
Verifies the expectation that theCaseExecution
is 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 theCaseExecution
is 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 theCaseExecution
is 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 theCaseExecution
is 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 theCaseExecution
is 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 childCaseExecution
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:
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 descendantCaseExecution
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:
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 chainedHumanTaskAssert
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:
ProcessEngineException
- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
humanTask
Enter into a chainedHumanTaskAssert
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:
ProcessEngineException
- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
caseTask
Enter into a chainedCaseTaskAssert
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:
ProcessEngineException
- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
caseTask
Enter into a chainedCaseTaskAssert
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:
ProcessEngineException
- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
processTask
Enter into a chainedProcessTaskAssert
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:
ProcessEngineException
- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
processTask
Enter into a chainedProcessTaskAssert
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:
ProcessEngineException
- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
stage
Enter into a chainedStageAssert
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:
ProcessEngineException
- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
stage
Enter into a chainedStageAssert
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:
ProcessEngineException
- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
milestone
Enter into a chainedMilestoneAssert
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:
ProcessEngineException
- in case more than one CaseExecution is delivered by the query (after being narrowed to the actual 'parent' CaseExecution)
-
milestone
Enter into a chainedMilestoneAssert
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:
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:
getCurrent
in 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 toCaseInstance
of actualCaseExecution
- Overrides:
caseExecutionQuery
in classAbstractProcessAssert<S extends AbstractCaseAssert<S,
A>, A extends CaseExecution>
-
historicCaseActivityInstanceQuery
HistoricCaseActivityInstanceQuery, automatically narrowed toCaseInstance
of actualCaseExecution
- Overrides:
historicCaseActivityInstanceQuery
in classAbstractProcessAssert<S extends AbstractCaseAssert<S,
A>, A extends CaseExecution>
-
toString
- Specified by:
toString
in 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
-