From b2c0528da052b5c73e3fc1f7f98d22578acd91f0 Mon Sep 17 00:00:00 2001 From: xuegao Date: Fri, 19 Mar 2021 14:04:17 +0100 Subject: Improve test coverage Add unit tests to improve test coverage. Issue-ID: SDC-3428 Change-Id: I29a8f1d49f1dfd6bca79f3d873d1e1ff7adc4fb2 Signed-off-by: xuegao --- .../zusammen/convertor/ElementToFeatureGroupConvertorTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib') diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/test/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/convertor/ElementToFeatureGroupConvertorTest.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/test/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/convertor/ElementToFeatureGroupConvertorTest.java index 49624a5c55..d1be5ed9a8 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/test/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/convertor/ElementToFeatureGroupConvertorTest.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/test/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/convertor/ElementToFeatureGroupConvertorTest.java @@ -17,6 +17,7 @@ package org.openecomp.sdc.vendorlicense.dao.impl.zusammen.convertor; import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import com.amdocs.zusammen.adaptor.inbound.api.types.item.ElementInfo; import com.amdocs.zusammen.adaptor.inbound.api.types.item.ZusammenElement; @@ -36,7 +37,9 @@ public class ElementToFeatureGroupConvertorTest { @Test public void shouldConvertElementToFeatureGroupEntity() { - ZusammenElement elementToConvert = new ZusammenElement(); + ZusammenElement elementToConvert = null; + assertNull(converter.convert(elementToConvert)); + elementToConvert = new ZusammenElement(); elementToConvert.setElementId(new Id(ENTITY_ID)); elementToConvert.setInfo(createInfo()); FeatureGroupEntity result = converter.convert(elementToConvert); @@ -47,7 +50,9 @@ public class ElementToFeatureGroupConvertorTest { @Test public void shouldConvertElementInfoToFeatureGroupEntity(){ - ElementInfo elementToConvert = new ElementInfo(); + ElementInfo elementToConvert = null; + assertNull(converter.convert(elementToConvert)); + elementToConvert = new ElementInfo(); elementToConvert.setId(new Id(ENTITY_ID)); elementToConvert.setInfo(createInfo()); FeatureGroupEntity result = converter.convert(elementToConvert); -- cgit 1.2.3-korg