use of org.onap.so.bpmn.common.DelegateExecutionImpl 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.onap.so.bpmn.common.DelegateExecutionImpl 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.onap.so.bpmn.common.DelegateExecutionImpl 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.onap.so.bpmn.common.DelegateExecutionImpl in project so by onap.
the class AAICommonTasksTest method setup.
@Before
public void setup() {
serviceInstance = new ServiceInstance();
buildingBlockExecution = new DelegateExecutionImpl(new DelegateExecutionFake());
}
use of org.onap.so.bpmn.common.DelegateExecutionImpl in project so by onap.
the class TestDataSetup method buildingBlockTestDataSetupBefore.
@Before
public void buildingBlockTestDataSetupBefore() {
collectionCounter = 0;
configurationCounter = 0;
customerCounter = 0;
genericVnfCounter = 0;
instanceGroupCounter = 0;
l3NetworkCounter = 0;
owningEntityCounter = 0;
pnfCounter = 0;
projectCounter = 0;
serviceInstanceCounter = 0;
serviceProxyCounter = 0;
serviceSubscriptionCounter = 0;
vfModuleCounter = 0;
volumeGroupCounter = 0;
vpnBindingCounter = 0;
vpnBondingLinkCounter = 0;
execution = new DelegateExecutionImpl(new ExecutionImpl());
execution.setVariable("testProcessKey", "testProcessKeyValue");
gBBInput = new GeneralBuildingBlock();
execution.setVariable("gBBInput", gBBInput);
lookupKeyMap = new HashMap<ResourceKey, String>();
execution.setVariable("lookupKeyMap", lookupKeyMap);
ExecutionImpl mockExecutionImpl = mock(ExecutionImpl.class);
doReturn("test").when(mockExecutionImpl).getProcessInstanceId();
ExecutionImpl executionImpl = new ExecutionImpl();
executionImpl.setProcessInstance(mockExecutionImpl);
delegateExecution = (DelegateExecution) executionImpl;
delegateExecution.setVariable("testProcessKey", "testProcessKeyValue");
}
Aggregations