diff options
author | Sunder Tattavarada <statta@research.att.com> | 2019-03-13 15:14:26 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-13 15:14:26 +0000 |
commit | 1ded3bb69c5e91cd879d83e13d2b3295710cdb4f (patch) | |
tree | 869b5ed0fbf84315c00dcd6a3878f43edc5e0235 /ecomp-sdk/epsdk-domain/src/test/java/org | |
parent | a54a41c107279a760ee4fa122141cc21fe150200 (diff) | |
parent | 3911c26a7fda32b8f3332ceb7fa3adc34b4ece62 (diff) |
Merge "Reduce method parameter by implementing builder"
Diffstat (limited to 'ecomp-sdk/epsdk-domain/src/test/java/org')
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(){ |