summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-domain/src/test
diff options
context:
space:
mode:
authorArindam Mondal <arind.mondal@samsung.com>2019-02-25 18:08:57 +0900
committerarindamm <arind.mondal@samsung.com>2019-02-25 18:55:50 +0900
commit3911c26a7fda32b8f3332ceb7fa3adc34b4ece62 (patch)
treeb32411a7e841b78f464d63fdd94c730a4337c42e /ecomp-sdk/epsdk-domain/src/test
parent7b740b078f8fb593c2615e8b6689d30ea46a0c86 (diff)
Reduce method parameter by implementing builder
Issue-ID: PORTAL-529 Change-Id: I1f5adc677d43c2fdc4e18f893e11b708608b0b36 Signed-off-by: arindamm <arind.mondal@samsung.com>
Diffstat (limited to 'ecomp-sdk/epsdk-domain/src/test')
-rw-r--r--ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementDetailsTest.java5
-rw-r--r--ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementTest.java3
2 files changed, 3 insertions, 5 deletions
diff --git a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementDetailsTest.java b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementDetailsTest.java
index d6b9c11b..62149054 100644
--- a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementDetailsTest.java
+++ b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementDetailsTest.java
@@ -40,12 +40,11 @@ package org.onap.portalsdk.core.domain.support;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.onap.portalsdk.core.domain.support.ElementDetails;
public class ElementDetailsTest {
public ElementDetails mockElementDetails(){
- ElementDetails elementDetails = new ElementDetails("test","test","test","test","test","test","test","test","test","test");
+ ElementDetails elementDetails = new ElementDetails.ElementDetailsBuilder().setLogical_group("test").setDisplay_longname("test").setDescription("test").setPrimary_function("test").setNetwork_function("test").setKey_interfaces("test").setLocation("test").setVendor("test").setVendor_shortname("test").setEnclosingContainer("test").createElementDetails();
elementDetails.setLogical_group("test");
@@ -56,7 +55,7 @@ public class ElementDetailsTest {
public void elementDetailsTest(){
ElementDetails elementDetails = mockElementDetails();
- ElementDetails elementDetails1 = new ElementDetails("test","test","test","test","test","test","test","test","test","test");
+ ElementDetails elementDetails1 = new ElementDetails.ElementDetailsBuilder().setLogical_group("test").setDisplay_longname("test").setDescription("test").setPrimary_function("test").setNetwork_function("test").setKey_interfaces("test").setLocation("test").setVendor("test").setVendor_shortname("test").setEnclosingContainer("test").createElementDetails();
elementDetails1.setLogical_group("test");
assertEquals(elementDetails.getLogical_group(), elementDetails1.getLogical_group());
diff --git a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementTest.java b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementTest.java
index bf58de1a..a3cfb4b1 100644
--- a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementTest.java
+++ b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ElementTest.java
@@ -43,7 +43,6 @@ import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
-import org.onap.portalsdk.core.domain.support.Element;
public class ElementTest {
@@ -51,7 +50,7 @@ public class ElementTest {
@Before
public void setUp()
{
- details= new ElementDetails("logical_group", "display_longname", "description", "primary_function", "network_function", "key_interfaces", "location", "vendor", "vendor_shortname", "enclosingContainer");
+ details= new ElementDetails.ElementDetailsBuilder().setLogical_group("logical_group").setDisplay_longname("display_longname").setDescription("description").setPrimary_function("primary_function").setNetwork_function("network_function").setKey_interfaces("key_interfaces").setLocation("location").setVendor("vendor").setVendor_shortname("vendor_shortname").setEnclosingContainer("enclosingContainer").createElementDetails();
}
public Element mockElement(){