aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test/java/org
diff options
context:
space:
mode:
authorMax Benjamin <max.benjamin@att.com>2019-06-06 17:37:59 +0000
committerGerrit Code Review <gerrit@onap.org>2019-06-06 17:37:59 +0000
commitc4b90365d5c117bc6fd64af421a1468539a8aec3 (patch)
tree7b81c7516ecb099c880c3d878c1f828f3785fe23 /bpmn/MSOCommonBPMN/src/test/java/org
parentfd0b48f7130300c70395742341a0cec2487bd6fa (diff)
parent560e84158798cb884de65e3cf33ab657f0e6e6df (diff)
Merge "Merge remote-tracking branch 'origin/dublin' into 'origin/master'"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java/org')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java12
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java13
2 files changed, 25 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java
index 8ab2c8e155..7bd2beeb92 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java
@@ -227,4 +227,16 @@ public class ExtractPojosForBBTest extends BaseTest {
gBBInput.setCustomer(customer);
extractPojos.extractByKey(execution, ResourceKey.VPN_BONDING_LINK_ID);
}
+
+ @Test
+ public void getServiceInstanceWithNoCustomer() throws BBObjectNotFoundException {
+ ServiceInstance serviceInstancePend = new ServiceInstance();
+ serviceInstancePend.setServiceInstanceId("abc");
+ lookupKeyMap.put(ResourceKey.SERVICE_INSTANCE_ID, serviceInstancePend.getServiceInstanceId());
+ Customer customer = new Customer();
+ gBBInput.setCustomer(customer);
+ gBBInput.setServiceInstance(serviceInstancePend);
+ ServiceInstance extractServPend = extractPojos.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
+ assertEquals(extractServPend.getServiceInstanceId(), serviceInstancePend.getServiceInstanceId());
+ }
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
index 37f8b8b2fd..13d2b7d3d3 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
@@ -573,6 +573,19 @@ public class BBInputSetupMapperLayerTest {
}
@Test
+ public void testMapOrchestrationContextNoRequestInfo() throws IOException {
+ OrchestrationContext expected = new OrchestrationContext();
+ expected.setIsRollbackEnabled(false);
+
+ RequestDetails requestDetails = mapper.readValue(
+ new File(RESOURCE_PATH + "RequestDetailsInput_mapReqContextNoRequestInfo.json"), RequestDetails.class);
+
+ OrchestrationContext actual = bbInputSetupMapperLayer.mapOrchestrationContext(requestDetails);
+
+ assertThat(actual, sameBeanAs(expected));
+ }
+
+ @Test
public void testMapLocationContext() {
CloudRegion expected = new CloudRegion();
expected.setCloudOwner("test-owner-name");