From d7aebcd7399b5111b2ffac7755eb61eb58456c67 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Mon, 4 Mar 2019 10:15:14 -0500 Subject: Remove restriction on mapping String values only Correct the JUnits to address userParams non-String values Remove restriction on mapping of String values only for userParams in BB RequestContext. Change-Id: I8a0d30e61618c275301d62bf04c064bea56c1b4d Issue-ID: SO-1593 Signed-off-by: Benjamin, Max (mb388a) --- .../tasks/BBInputSetupMapperLayerTest.java | 10 ++++++---- .../so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/test/java') 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 753a354d95..3cb7b241dc 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 @@ -643,14 +643,16 @@ public class BBInputSetupMapperLayerTest { @Test public void testMapNameValueUserParams() throws IOException { RequestDetails requestDetails = mapper.readValue(new File(RESOURCE_PATH + "RequestDetailsInput_mapReqContext.json"), RequestDetails.class); - Map actual = bbInputSetupMapperLayer.mapNameValueUserParams(requestDetails.getRequestParameters()); + Map actual = bbInputSetupMapperLayer.mapNameValueUserParams(requestDetails.getRequestParameters()); + assertTrue(actual.containsKey("mns_vfw_protected_route_prefixes")); + assertTrue(actual.get("mns_vfw_protected_route_prefixes").toString().contains("interface_route_table_routes_route")); + assertTrue(actual.get("mns_vfw_protected_route_prefixes").toString().contains("1.1.1.1/32")); + assertTrue(actual.get("mns_vfw_protected_route_prefixes").toString().contains("0::1/128")); assertTrue(actual.containsKey("name1")); assertTrue(actual.containsValue("value1")); assertTrue(actual.get("name1").equals("value1")); - assertTrue(actual.containsKey("name2")); - assertTrue(actual.containsValue("value2")); - assertTrue(actual.get("name2").equals("value2")); + assertFalse(actual.containsKey("ignore")); assertFalse(actual.containsValue("ignore")); } 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 56875d315b..cea8fc3cc2 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 @@ -776,7 +776,7 @@ public class BBInputSetupTest { @Test public void testPopulateGBBWithSIAndAdditionalInfo() throws Exception { - GeneralBuildingBlock expected = mapper.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockExpected.json"), + GeneralBuildingBlock expected = mapper.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockExpectedWUserParamsInfo.json"), GeneralBuildingBlock.class); ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"), ExecuteBuildingBlock.class); -- cgit 1.2.3-korg