From 1c410e5603e2536ea1517158681a0d0aef5a1e74 Mon Sep 17 00:00:00 2001 From: talio Date: Tue, 14 May 2019 10:33:22 +0300 Subject: Fix test coverage Fix test coverage for UiComponentDataConverter.java Change-Id: I745acb3bd3e40c58c12d1d359bb3b06c8bc95f09 Issue-ID: SDC-2298 Signed-off-by: talio --- .../sdc/be/datamodel/utils/UiComponentDataConverter.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'catalog-be/src/main/java') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java index 858d15ab9e..fbc451dd11 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java @@ -124,12 +124,7 @@ public class UiComponentDataConverter { setComponentInstanceInputs(dataTransfer, component); break; case NODE_FILTER: - if(component.getNodeFilterComponents() == null) { - dataTransfer.setNodeFilterData(null); - } else { - NodeFilterConverter nodeFilterConverter = new NodeFilterConverter(); - dataTransfer.setNodeFilterData(nodeFilterConverter.convertDataMapToUI(component.getNodeFilterComponents())); - } + setNodeFilter(dataTransfer, component); break; case COMPONENT_INSTANCES_INTERFACES: setComponentInstanceInterfaces(dataTransfer, component); @@ -145,6 +140,14 @@ public class UiComponentDataConverter { } } + private void setNodeFilter(UiComponentDataTransfer dataTransfer, Component component) { + if(component.getNodeFilterComponents() == null) { + dataTransfer.setNodeFilter(null); + } else { + dataTransfer.setNodeFilter(component.getNodeFilterComponents()); + } + } + private void setPolicies(UiComponentDataTransfer dataTransfer, Component component) { Map policies = component.getPolicies(); Set policyDefinitions = -- cgit 1.2.3-korg