From c58bf4418371bfff331c933b182f1f61dc8eaf15 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Tue, 26 Feb 2019 09:57:29 -0500 Subject: Default fromPreload to false if no Correct JUnit test data for default from-preload value Default fromPreload to false if no requestParameters are available. Change-Id: I20846871958226740e4a5dee90c8e31ff3bdfddf Issue-ID: SO-1572 Signed-off-by: Benjamin, Max (mb388a) --- .../org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java | 2 +- .../onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java | 4 ++-- .../genericResourceApiVfModuleOperationInformationUnassign.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bpmn/so-bpmn-tasks/src') diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java index d7a9ff1cf7..7632831111 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java @@ -139,7 +139,7 @@ public class GeneralTopologyObjectMapper { vfModuleInformation.setFromPreload(requestContext.getRequestParameters().getUsePreload()); } else { - vfModuleInformation.setFromPreload(null); + vfModuleInformation.setFromPreload(false); } return vfModuleInformation; diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java index c039e308f8..bf2cd347c0 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java @@ -361,7 +361,7 @@ public class GeneralTopologyObjectMapperTest extends TestDataSetup { assertNull(gcRequestInput.getOnapModelInformation()); assertEquals(vfModule.getVfModuleId(),gcRequestInput.getVfModuleId()); assertNotNull(gcRequestInput.getVfModuleId()); - assertNull(gcRequestInput.getFromPreload()); + assertFalse(gcRequestInput.getFromPreload()); } @Test @@ -385,7 +385,7 @@ public class GeneralTopologyObjectMapperTest extends TestDataSetup { assertNull(gcRequestInput.getOnapModelInformation()); assertEquals(vfModule.getVfModuleId(),gcRequestInput.getVfModuleId()); assertNotNull(gcRequestInput.getVfModuleId()); - assertNull(gcRequestInput.getFromPreload()); + assertFalse(gcRequestInput.getFromPreload()); } @Test diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json index f06d72a806..cecb4c1dc7 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json @@ -22,7 +22,7 @@ }, "vf-module-information" : { "vf-module-id" : "testVfModuleId", - "from-preload": null + "from-preload": false }, "vnf-information" : { "vnf-id" : "testVnfId", -- cgit 1.2.3-korg