From b58f841d09e1d832ea4aeae1334f151a98a1f4c8 Mon Sep 17 00:00:00 2001 From: "Smokowski, Steven" Date: Mon, 3 Feb 2020 14:48:24 -0500 Subject: modifications to create network to add lob Add platform and line of business to network Update to split out network Issue-ID: SO-2637 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I5cbc3bc77986b6d4d420d2158df46924fcd74c0b --- .../tasks/BBInputSetupTest.java | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/test') 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 a45e803cf0..1acf4edb4a 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 @@ -1262,7 +1262,7 @@ public class BBInputSetupTest { verify(SPY_bbInputSetup, times(1)).mapCatalogNetwork(network, modelInfo, service); instanceName = "networkName2"; - L3Network network2 = SPY_bbInputSetup.createNetwork(lookupKeyMap, instanceName, resourceId, null); + L3Network network2 = SPY_bbInputSetup.createNetwork(lookupKeyMap, instanceName, resourceId, null, parameter); SPY_bbInputSetup.populateL3Network(parameter); verify(SPY_bbInputSetup, times(2)).mapCatalogNetwork(network2, modelInfo, service); } @@ -2832,17 +2832,32 @@ public class BBInputSetupTest { expected.setNetworkId(networkId); expected.setNetworkName(instanceName); expected.setCloudParams(cloudParams); + Platform platform = new Platform(); + platform.setPlatformName("platformName"); + expected.setPlatform(platform); + LineOfBusiness lineOfBusiness = new LineOfBusiness(); + lineOfBusiness.setLineOfBusinessName("lineOfBusiness"); + expected.setLineOfBusiness(lineOfBusiness); expected.setOrchestrationStatus(OrchestrationStatus.PRECREATED); Map lookupKeyMap = new HashMap<>(); List> instanceParams = new ArrayList<>(); instanceParams.add(cloudParams); - L3Network actual = SPY_bbInputSetup.createNetwork(lookupKeyMap, instanceName, networkId, instanceParams); + org.onap.so.serviceinstancebeans.Platform platformRequest = new org.onap.so.serviceinstancebeans.Platform(); + org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusinessRequest = + new org.onap.so.serviceinstancebeans.LineOfBusiness(); + lineOfBusinessRequest.setLineOfBusinessName("lineOfBusiness"); + platformRequest.setPlatformName("platformName"); + BBInputSetupParameter parameter = new BBInputSetupParameter.Builder().setRequestId(REQUEST_ID) + .setPlatform(platformRequest).setLineOfBusiness(lineOfBusinessRequest).build(); + L3Network actual = + SPY_bbInputSetup.createNetwork(lookupKeyMap, instanceName, networkId, instanceParams, parameter); assertThat(actual, sameBeanAs(expected)); assertEquals("LookupKeyMap is populated", networkId, lookupKeyMap.get(ResourceKey.NETWORK_ID)); expected.getCloudParams().clear(); - actual = SPY_bbInputSetup.createNetwork(lookupKeyMap, instanceName, networkId, null); + + actual = SPY_bbInputSetup.createNetwork(lookupKeyMap, instanceName, networkId, null, parameter); assertThat(actual, sameBeanAs(expected)); } -- cgit 1.2.3-korg