aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test/java/org
diff options
context:
space:
mode:
authorMateusz Gołuchowski <mateusz.goluchowski@nokia.com>2020-06-25 16:03:55 +0200
committerMateusz Gołuchowski <mateusz.goluchowski@nokia.com>2020-06-26 10:38:38 +0200
commitbd8108c98564c76aff752ccd64b18927342afc8c (patch)
tree33229731ddfd859fe5afa61331e485c3d715dcaf /bpmn/MSOCommonBPMN/src/test/java/org
parent9f4721c6858cd3dc1b94b22febd2fe5e38f8de3c (diff)
Workflow refactoring - revert changes
Reverted changes concerning: - extracting base class for ConfigBuildingBlocksDataObject and ExecuteBuildingBlock - removing fluent setters The reason for revert is that new hierarchy forced ConfigBuildingBlocksDataObject to implement serializable. Issue-ID: SO-2634 Change-Id: I375db2004687f1f634adac31d4d1af3675f5981c Signed-off-by: Mateusz Goluchowski <mateusz.goluchowski@nokia.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java/org')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPopulateMethodsTest.java9
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java54
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDayTest.java3
3 files changed, 22 insertions, 44 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPopulateMethodsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPopulateMethodsTest.java
index a74d78e04b..d7cfaf94f7 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPopulateMethodsTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPopulateMethodsTest.java
@@ -115,8 +115,7 @@ public class BBInputSetupPopulateMethodsTest {
.readValue(new File(RESOURCE_PATH + "RequestDetailsInput_serviceMacro.json"), RequestDetails.class);
ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"),
ExecuteBuildingBlock.class);
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName(AssignFlows.NETWORK_MACRO.toString())
.setKey("ab153b6e-c364-44c0-bef6-1f2982117f04");
@@ -182,8 +181,7 @@ public class BBInputSetupPopulateMethodsTest {
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"),
ExecuteBuildingBlock.class);
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName(AssignFlows.VF_MODULE.toString()).setKey("a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f");
@@ -245,8 +243,7 @@ public class BBInputSetupPopulateMethodsTest {
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"),
ExecuteBuildingBlock.class);
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName("AssignFabricConfigurationBB").setKey("72d9d1cd-f46d-447a-abdb-451d6fb05fa9");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
index ffdc275dee..458919c48e 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
@@ -308,9 +308,8 @@ public class BBInputSetupTest {
@Test
public void testGetExecuteBBFromExecution() throws IOException {
BuildingBlock bb = new BuildingBlock().setBpmnFlowName("AssignServiceInstanceBB");
- ExecuteBuildingBlock expected = new ExecuteBuildingBlock();
- expected.setBuildingBlock(bb);
- expected.setRequestId("00032ab7-3fb3-42e5-965d-8ea592502017");
+ ExecuteBuildingBlock expected =
+ new ExecuteBuildingBlock().setBuildingBlock(bb).setRequestId("00032ab7-3fb3-42e5-965d-8ea592502017");
DelegateExecution execution = Mockito.mock(DelegateExecution.class);
doReturn(expected).when(execution).getVariable(any(String.class));
ExecuteBuildingBlock actual = SPY_bbInputSetup.getExecuteBBFromExecution(execution);
@@ -322,8 +321,7 @@ public class BBInputSetupTest {
GeneralBuildingBlock expected = mapper.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockExpected.json"),
GeneralBuildingBlock.class);
- ExecuteBuildingBlock executeBB = new ExecuteBuildingBlock();
- executeBB.setRequestId("requestId");
+ ExecuteBuildingBlock executeBB = new ExecuteBuildingBlock().setRequestId("requestId");
RequestDetails requestDetails = new RequestDetails();
ModelInfo modelInfo = new ModelInfo();
modelInfo.setModelType(ModelType.service);
@@ -351,8 +349,7 @@ public class BBInputSetupTest {
GeneralBuildingBlock expected = mapper
.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockCMExpected.json"), GeneralBuildingBlock.class);
- ExecuteBuildingBlock executeBB = new ExecuteBuildingBlock();
- executeBB.setRequestId("requestId");
+ ExecuteBuildingBlock executeBB = new ExecuteBuildingBlock().setRequestId("requestId");
RequestDetails requestDetails = new RequestDetails();
requestDetails.setModelInfo(null);
RequestParameters requestParams = new RequestParameters();
@@ -1006,9 +1003,7 @@ public class BBInputSetupTest {
Map<ResourceKey, String> lookupKeyMap = new HashMap<>();
BuildingBlock buildingBlock = new BuildingBlock().setBpmnFlowName(AssignFlows.SERVICE_INSTANCE.toString());
- ExecuteBuildingBlock executeBB = new ExecuteBuildingBlock();
- executeBB.setaLaCarte(true);
- executeBB.setBuildingBlock(buildingBlock);
+ ExecuteBuildingBlock executeBB = new ExecuteBuildingBlock().setaLaCarte(true).setBuildingBlock(buildingBlock);
RequestDetails requestDetails = new RequestDetails();
RequestInfo reqInfo = new RequestInfo();
reqInfo.setInstanceName("serviceInstanceName");
@@ -2055,8 +2050,7 @@ public class BBInputSetupTest {
Map<ResourceKey, String> lookupKeyMap = prepareLookupKeyMap();
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName("AssignVrfConfigurationBB");
buildingBlock.setKey("72d9d1cd-f46d-447a-abdb-451d6fb05fa9");
@@ -2236,8 +2230,7 @@ public class BBInputSetupTest {
.readValue(new File(RESOURCE_PATH + "RequestDetailsInput_serviceMacro.json"), RequestDetails.class);
ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"),
ExecuteBuildingBlock.class);
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName(AssignFlows.NETWORK_MACRO.toString())
.setKey("ab153b6e-c364-44c0-bef6-1f2982117f04");
@@ -2306,8 +2299,7 @@ public class BBInputSetupTest {
requestDetails.getRequestParameters().setUserParams(null);
ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"),
ExecuteBuildingBlock.class);
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName(AssignFlows.NETWORK_MACRO.toString())
.setKey("ab153b6e-c364-44c0-bef6-1f2982117f04").setIsVirtualLink(false);
@@ -2352,8 +2344,7 @@ public class BBInputSetupTest {
requestDetails.getRequestParameters().setUserParams(null);
ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"),
ExecuteBuildingBlock.class);
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName(AssignFlows.NETWORK_MACRO.toString())
.setKey("ab153b6e-c364-44c0-bef6-1f2982117f04").setIsVirtualLink(true);
@@ -2399,8 +2390,7 @@ public class BBInputSetupTest {
requestDetails.getRequestParameters().setUserParams(null);
ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"),
ExecuteBuildingBlock.class);
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName(otherFlowName).setKey("ab153b6e-c364-44c0-bef6-1f2982117f04")
.setIsVirtualLink(true);
@@ -2472,8 +2462,7 @@ public class BBInputSetupTest {
aaiNetwork.setModelCustomizationId("modelCustId");
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName("DeleteNetworkBB").setKey("ab153b6e-c364-44c0-bef6-1f2982117f04");
@@ -2524,8 +2513,7 @@ public class BBInputSetupTest {
aaiVnf.setModelCustomizationId("modelCustId");
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName("ControllerExecutionBB").setKey("ab153b6e-c364-44c0-bef6-1f2982117f04");
buildingBlock.setBpmnScope("VNF");
@@ -2577,8 +2565,7 @@ public class BBInputSetupTest {
aaiVnf.setModelCustomizationId("modelCustId");
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName("ActivateVnfBB").setKey("ab153b6e-c364-44c0-bef6-1f2982117f04");
@@ -2634,8 +2621,7 @@ public class BBInputSetupTest {
aaiVfModule.setModelCustomizationId("modelCustId");
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName("ControllerExecutionBB").setKey("a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f");
buildingBlock.setBpmnScope("VfModule");
@@ -2695,8 +2681,7 @@ public class BBInputSetupTest {
aaiVfModule.setModelCustomizationId("modelCustId");
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName("UnassignVfModuleBB").setKey("a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f");
@@ -2757,8 +2742,7 @@ public class BBInputSetupTest {
aaiVolumeGroup.setModelCustomizationId("modelCustId");
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName("UnassignVolumeGroupBB").setKey("72d9d1cd-f46d-447a-abdb-451d6fb05fa8");
@@ -2824,8 +2808,7 @@ public class BBInputSetupTest {
aaiConfiguration.setModelCustomizationId("modelCustId");
ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys();
- executeBB.setConfigurationResourceKeys(configResourceKeys);
- executeBB.setRequestDetails(requestDetails);
+ executeBB.setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails);
BuildingBlock buildingBlock = executeBB.getBuildingBlock();
buildingBlock.setBpmnFlowName("ActivateFabricConfigurationBB").setKey("72d9d1cd-f46d-447a-abdb-451d6fb05fa9");
@@ -2893,8 +2876,7 @@ public class BBInputSetupTest {
@Test
public void testGetVnfId() {
String expected = "vnfId";
- ExecuteBuildingBlock executeBB = new ExecuteBuildingBlock();
- executeBB.setRequestId("requestId");
+ ExecuteBuildingBlock executeBB = new ExecuteBuildingBlock().setRequestId("requestId");
Map<ResourceKey, String> lookupKeyMap = new HashMap<>();
InfraActiveRequests request = new InfraActiveRequests();
request.setVnfId(expected);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDayTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDayTest.java
index bac29150c1..ee47b514d1 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDayTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDayTest.java
@@ -58,8 +58,7 @@ public class ExecuteBuildingBlockRainyDayTest extends BaseTest {
vnf = setGenericVnf();
BuildingBlock buildingBlock = new BuildingBlock().setBpmnFlowName("AssignServiceInstanceBB");
- ExecuteBuildingBlock executeBuildingBlock = new ExecuteBuildingBlock();
- executeBuildingBlock.setBuildingBlock(buildingBlock);
+ ExecuteBuildingBlock executeBuildingBlock = new ExecuteBuildingBlock().setBuildingBlock(buildingBlock);
delegateExecution.setVariable("gBBInput", gBBInput);
delegateExecution.setVariable("WorkflowException", new WorkflowException("", 7000, ""));