aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-04-06 13:30:52 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-06 13:30:52 +0000
commit75bf985a00799617a6ae8c278596e3d4f591f17e (patch)
treefc7be2e2035dbf1090293b859485ea96b3b9240a /bpmn/MSOCommonBPMN/src/test
parent3b0019a08a5eb405c7df00958b1b90e2d91b98d1 (diff)
parentfd0f5f41dccae8837045314a3b34a473b62e474b (diff)
Merge "updated bbinput setup to pull vf if no vnf found"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java26
1 files changed, 26 insertions, 0 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 df7337c0d9..21b0d834dd 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
@@ -2947,6 +2947,32 @@ public class BBInputSetupTest {
}
@Test
+ public void testMapCatalogVfModuleIfNoVnf() {
+ String vnfModelCustomizationUUID = "vnfResourceCustUUID";
+ String vfModuleCustomizationUUID = "vfModelCustomizationUUID";
+ VfModule vfModule = new VfModule();
+ ModelInfo modelInfo = new ModelInfo();
+ modelInfo.setModelCustomizationUuid(vfModuleCustomizationUUID);
+ Service service = new Service();
+ VnfResourceCustomization vnfResourceCust = new VnfResourceCustomization();
+ vnfResourceCust.setModelCustomizationUUID(vnfModelCustomizationUUID);
+ VfModuleCustomization vfModuleCust = new VfModuleCustomization();
+ vfModuleCust.setModelCustomizationUUID(vfModuleCustomizationUUID);
+ vnfResourceCust.getVfModuleCustomizations().add(vfModuleCust);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ doReturn(vfModuleCust).when(SPY_bbInputSetupUtils)
+ .getVfModuleCustomizationByModelCuztomizationUUID(vfModuleCustomizationUUID);
+ doReturn(modelInfoVfModule).when(bbInputSetupMapperLayer).mapCatalogVfModuleToVfModule(vfModuleCust);
+
+ SPY_bbInputSetup.mapCatalogVfModule(vfModule, modelInfo, service, vnfModelCustomizationUUID);
+
+ assertThat(vfModule.getModelInfoVfModule(), sameBeanAs(modelInfoVfModule));
+
+ verify(SPY_bbInputSetupUtils, times(1))
+ .getVfModuleCustomizationByModelCuztomizationUUID(modelInfo.getModelCustomizationId());
+ }
+
+ @Test
public void testPopulateVfModule() throws Exception {
String vnfId = "vnfId";
String vfModuleId = "vfModuleId";