summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authortalio <tali.orenbach@amdocs.com>2019-05-14 10:33:22 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2019-05-14 12:01:13 +0000
commit1c410e5603e2536ea1517158681a0d0aef5a1e74 (patch)
tree2790aeccc52ff1db5a31310cd991c595db771fa7 /catalog-be/src/main
parent4a1d486523e13df2469fead292690593a01d9be3 (diff)
Fix test coverage
Fix test coverage for UiComponentDataConverter.java Change-Id: I745acb3bd3e40c58c12d1d359bb3b06c8bc95f09 Issue-ID: SDC-2298 Signed-off-by: talio <tali.orenbach@amdocs.com>
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java15
1 files changed, 9 insertions, 6 deletions
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<String, PolicyDefinition> policies = component.getPolicies();
Set<PolicyDefinition> policyDefinitions =