use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class MultiInstanceReceiveTaskScenarioTest method testInitParallelActivityInstanceTree.
@Test
@ScenarioUnderTest("initParallel.2")
public void testInitParallelActivityInstanceTree() {
// given
ProcessInstance instance = rule.processInstance();
// when
ActivityInstance activityInstance = rule.getRuntimeService().getActivityInstance(instance.getId());
// then
Assert.assertNotNull(activityInstance);
assertThat(activityInstance).hasStructure(describeActivityInstanceTree(instance.getProcessDefinitionId()).activity("miReceiveTask").activity("miReceiveTask").activity("miReceiveTask").done());
}
use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class MultiInstanceReceiveTaskScenarioTest method testInitParallelDeletion.
@Test
@ScenarioUnderTest("initParallel.3")
public void testInitParallelDeletion() {
// given
ProcessInstance instance = rule.processInstance();
// when
rule.getRuntimeService().deleteProcessInstance(instance.getId(), null);
// then
rule.assertScenarioEnded();
}
use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class MultiInstanceReceiveTaskScenarioTest method testInitSequentialDeletion.
@Test
@ScenarioUnderTest("initSequential.3")
public void testInitSequentialDeletion() {
// given
ProcessInstance instance = rule.processInstance();
// when
rule.getRuntimeService().deleteProcessInstance(instance.getId(), null);
// then
rule.assertScenarioEnded();
}
use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class ParallelMultiInstanceScenarioTest method testInitNonInterruptingBoundaryEventCompletionCase1.
@Test
@ScenarioUnderTest("initNonInterruptingBoundaryEvent.1")
public void testInitNonInterruptingBoundaryEventCompletionCase1() {
// given
List<Task> subProcessTasks = rule.taskQuery().taskDefinitionKey("subProcessTask").list();
Task afterBoundaryTask = rule.taskQuery().taskDefinitionKey("afterBoundaryTask").singleResult();
// when all instances are completed
for (Task subProcessTask : subProcessTasks) {
rule.getTaskService().complete(subProcessTask.getId());
}
// and
rule.getTaskService().complete(afterBoundaryTask.getId());
// then
rule.assertScenarioEnded();
}
use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class ParallelMultiInstanceScenarioTest method testInitNonInterruptingBoundaryEventCompletionCase2.
@Test
@ScenarioUnderTest("initNonInterruptingBoundaryEvent.2")
public void testInitNonInterruptingBoundaryEventCompletionCase2() {
// given
List<Task> subProcessTasks = rule.taskQuery().taskDefinitionKey("subProcessTask").list();
Task afterBoundaryTask = rule.taskQuery().taskDefinitionKey("afterBoundaryTask").singleResult();
// when
rule.getTaskService().complete(afterBoundaryTask.getId());
for (Task subProcessTask : subProcessTasks) {
rule.getTaskService().complete(subProcessTask.getId());
}
// then
rule.assertScenarioEnded();
}
Aggregations