summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test
diff options
context:
space:
mode:
authorElena Kuleshov <evn@att.com>2019-05-20 11:45:55 -0400
committerElena Kuleshov <evn@att.com>2019-05-20 13:51:39 -0400
commit969333e6374d3e2259ab5fbbdbcbb3f4c12a134e (patch)
tree3de3d2d89881fb82b7135c72841d4df3d79a836d /bpmn/MSOCommonBPMN/src/test
parentb883a8c104a519e791c151654d88af30f71e04e9 (diff)
Check for null requestInfo
Check for null requestInfo Issue-ID: SO-1900 Signed-off-by: Kuleshov, Elena <evn@att.com> Change-Id: I2a3eb7ddbee396b19bcc71a2f647b9cf90082ed4
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java13
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContextNoRequestInfo.json29
2 files changed, 42 insertions, 0 deletions
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 e7afa9ec8b..39650a2142 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
@@ -571,6 +571,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");
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContextNoRequestInfo.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContextNoRequestInfo.json
new file mode 100644
index 0000000000..41f0fde834
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContextNoRequestInfo.json
@@ -0,0 +1,29 @@
+{
+ "requestParameters": {
+ "subscriptionServiceType": "subscriptionServiceType",
+ "userParams": [
+ {
+ "name" : "mns_vfw_protected_route_prefixes",
+ "value" : [ {
+ "interface_route_table_routes_route" : "1.1.1.1/32"
+ }, {
+ "interface_route_table_routes_route" : "0::1/128"
+ } ]
+ },
+ {
+ "name": "name1",
+ "value": "value1"
+ },
+ {
+ "ignore": "false",
+ "skip": "ignore"
+ }]
+ },
+ "configurationParameters": [
+ {
+ "availability-zone":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]",
+ "xtz-123":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"
+ }
+ ]
+}
+