aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test/java/org
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-03-10 14:54:01 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-10 14:54:01 +0000
commitb6e82755d6b3454951d3627dd3f51a0e2a50f49b (patch)
tree2cd478466eacc3031f14adb1cc15cbf6b6cadd37 /bpmn/MSOCommonBPMN/src/test/java/org
parent09c30d079215950c28494de4a1c20791da509e97 (diff)
parent5611741592b4a12c411eb83054318f4da86a1ead (diff)
Merge "update bbinputsetup to handle volume group replace"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java/org')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java13
1 files changed, 9 insertions, 4 deletions
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 1acf4edb4a..df7337c0d9 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
@@ -888,7 +888,6 @@ public class BBInputSetupTest {
verify(SPY_bbInputSetup, times(1)).populateGenericVnf(parameter);
assertEquals("VnfId populated", true,
lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID).equalsIgnoreCase(resourceId));
-
doReturn(ModelType.volumeGroup).when(modelInfo).getModelType();
resourceId = "volumeGroupId";
parameter.setResourceId(resourceId);
@@ -1159,12 +1158,13 @@ public class BBInputSetupTest {
ModelInfo mi = new ModelInfo();
mi.setModelType(ModelType.vnf);
mi.setModelCustomizationUuid("vnfModelCustomizationUUID");
+ mi.setModelCustomizationId("vnfModelCustomizationUUID");
ri.setModelInfo(mi);
ril.setRelatedInstance(ri);
requestDetails.setRelatedInstanceList(new RelatedInstanceList[] {ril});
ModelInfo modelInfo = new ModelInfo();
- modelInfo.setModelType(ModelType.volumeGroup);
+ modelInfo.setModelCustomizationId("volumeGroupCustId");
RequestInfo reqInfo = new RequestInfo();
reqInfo.setInstanceName("volumeGroupName");
@@ -1178,6 +1178,8 @@ public class BBInputSetupTest {
VolumeGroup vg = new VolumeGroup();
vg.setVolumeGroupName("volumeGroupName");
vg.setVolumeGroupId("volumeGroupId");
+ vg.setModelInfoVfModule(new ModelInfoVfModule());
+ vg.getModelInfoVfModule().setModelCustomizationUUID("volumeGroupCustId");
vnf.getVolumeGroups().add(vg);
serviceInstance.getVnfs().add(vnf);
@@ -1186,6 +1188,8 @@ public class BBInputSetupTest {
Map<ResourceKey, String> lookupKeyMap = new HashMap<>();
lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, "genericVnfId");
+ ServiceModel serviceModel = new ServiceModel();
+ serviceModel.setCurrentService(service);
String bbName = AssignFlows.VOLUME_GROUP.toString();
String resourceId = "123";
doNothing().when(SPY_bbInputSetup).mapCatalogVolumeGroup(isA(VolumeGroup.class), eq(modelInfo), eq(service),
@@ -1198,9 +1202,10 @@ public class BBInputSetupTest {
BBInputSetupParameter parameter = new BBInputSetupParameter.Builder().setRequestId(REQUEST_ID)
.setModelInfo(modelInfo).setService(service).setBbName(bbName).setServiceInstance(serviceInstance)
.setLookupKeyMap(lookupKeyMap).setResourceId(resourceId).setRequestDetails(requestDetails)
- .setInstanceName(reqInfo.getInstanceName()).build();
+ .setInstanceName(reqInfo.getInstanceName()).setServiceModel(serviceModel).build();
SPY_bbInputSetup.populateVolumeGroup(parameter);
- verify(SPY_bbInputSetup, times(1)).mapCatalogVolumeGroup(vg, modelInfo, service, "vnfModelCustomizationUUID");
+ verify(SPY_bbInputSetup, times(1)).mapCatalogVolumeGroup(eq(vg), isA(ModelInfo.class), eq(service),
+ eq("vnfModelCustomizationUUID"));
vnf.getVolumeGroups().clear();
SPY_bbInputSetup.populateVolumeGroup(parameter);
verify(SPY_bbInputSetup, times(1)).mapCatalogVolumeGroup(vnf.getVolumeGroups().get(0), modelInfo, service,