summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/test
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2018-11-10 11:46:40 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2018-11-10 11:52:22 -0500
commita21c5617e3b278a1bd179708b0345381632cef2b (patch)
treee326e4e56aa3a0cab994e3cab64594d22df1ffd6 /bpmn/so-bpmn-tasks/src/test
parent47ef22e3f9c0261835f1b07a4768e87a3d0fe71b (diff)
Bug fixes November 10th
use network name on delete when heat id not present compare mod count index as Integers Change-Id: I76e567378fed83fb857d4d16b88f7a199d0df475 Issue-ID: SO-1204 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test')
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java
index 8f0d00ff86..1283d3ab1a 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java
@@ -301,6 +301,42 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup{
}
@Test
+ public void deleteNetworkRequestNoHeatIdMapperTest() throws Exception {
+ DeleteNetworkRequest expectedDeleteNetworkRequest = new DeleteNetworkRequest();
+
+ String messageId = "messageId";
+ expectedDeleteNetworkRequest.setMessageId(messageId);
+ doReturn(messageId).when(SPY_networkAdapterObjectMapper).getRandomUuid();
+
+ ModelInfoNetwork modelInfoNetwork = new ModelInfoNetwork();
+ l3Network.setModelInfoNetwork(modelInfoNetwork);
+ modelInfoNetwork.setModelCustomizationUUID("modelCustomizationUuid");
+ expectedDeleteNetworkRequest.setModelCustomizationUuid(modelInfoNetwork.getModelCustomizationUUID());
+
+ MsoRequest msoRequest = new MsoRequest();
+ msoRequest.setRequestId(requestContext.getMsoRequestId());
+ msoRequest.setServiceInstanceId(serviceInstance.getServiceInstanceId());
+ expectedDeleteNetworkRequest.setMsoRequest(msoRequest);
+
+ expectedDeleteNetworkRequest.setNetworkId(l3Network.getNetworkId());
+
+ l3Network.setNetworkName("heatStackId");
+ expectedDeleteNetworkRequest.setNetworkStackId("heatStackId");
+
+ expectedDeleteNetworkRequest.setNetworkType(l3Network.getNetworkType());
+
+ expectedDeleteNetworkRequest.setSkipAAI(true);
+
+ expectedDeleteNetworkRequest.setTenantId(cloudRegion.getTenantId());
+
+ expectedDeleteNetworkRequest.setCloudSiteId(cloudRegion.getLcpCloudRegionId());
+
+ DeleteNetworkRequest deleteNetworkRequest = SPY_networkAdapterObjectMapper.deleteNetworkRequestMapper(requestContext, cloudRegion, serviceInstance, l3Network);
+
+ assertThat(expectedDeleteNetworkRequest, sameBeanAs(deleteNetworkRequest));
+ }
+
+ @Test
public void buildOpenstackSubnetListTest() throws Exception {
ObjectMapper omapper = new ObjectMapper();