use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class DeleteVfModuleTest method prepareBuildingBlockExecution.
private BuildingBlockExecution prepareBuildingBlockExecution() {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable("gBBInput", prepareGeneralBuildingBlock());
return new DelegateExecutionImpl(execution);
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class ServiceLevelUpgradeTest method prepareExecution.
private DelegateExecution prepareExecution() {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable(ServiceLevelConstants.SERVICE_INSTANCE_ID, "serviceTest");
execution.setVariable(ServiceLevelConstants.BPMN_REQUEST, "bpmnRequestTest");
execution.setVariable(ServiceLevelConstants.PNF_NAME, "pnfNameTest");
return execution;
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class HomingListenerTest method runWithHoming.
@Test
public void runWithHoming() {
// given
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable("homing", true);
execution.setVariable(CALLED_HOMING, false);
BuildingBlockExecution buildingBlockExecution = new DelegateExecutionImpl(execution);
ExecuteBuildingBlock executeBuildingBlock = new ExecuteBuildingBlock();
// when
new HomingListener().run(null, executeBuildingBlock, buildingBlockExecution);
// then
assertThat(executeBuildingBlock.isHoming()).isTrue();
assertThat((boolean) buildingBlockExecution.getVariable(CALLED_HOMING)).isTrue();
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class GeneratePayloadForCdsTest method createBuildingBlockExecution.
private BuildingBlockExecution createBuildingBlockExecution() {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable(GENERAL_BLOCK_EXECUTION_MAP_KEY, createGeneralBuildingBlock());
return new DelegateExecutionImpl(execution);
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class GeneratePayloadForCdsTest method prepareDelegateExecutionObj.
private DelegateExecution prepareDelegateExecutionObj(String scope, String action) {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable(PROCESS_KEY, TEST_PROCESS_KEY);
execution.setVariable(PNF_CORRELATION_ID, TEST_PNF_CORRELATION_ID);
execution.setVariable(MODEL_UUID, TEST_MODEL_UUID);
execution.setVariable(SERVICE_INSTANCE_ID, TEST_SERVICE_INSTANCE_ID);
execution.setVariable(MSO_REQUEST_ID, TEST_MSO_REQUEST_ID);
execution.setVariable(PNF_UUID, TEST_PNF_UUID);
execution.setVariable(PRC_INSTANCE_NAME, TEST_PNF_RESOURCE_INSTANCE_NAME);
execution.setVariable(PRC_CUSTOMIZATION_UUID, TEST_PNF_RESOURCE_CUSTOMIZATION_UUID);
execution.setVariable(PRC_TARGET_SOFTWARE_VERSION, TEST_SOFTWARE_VERSION);
execution.setVariable(PRC_BLUEPRINT_NAME, TEST_PNF_RESOURCE_BLUEPRINT_NAME);
execution.setVariable(PRC_BLUEPRINT_VERSION, TEST_PNF_RESOURCE_BLUEPRINT_VERSION);
execution.setVariable(SCOPE, scope);
execution.setVariable(ACTION, action);
execution.setVariable("mode", "async");
return execution;
}
Aggregations