diff options
author | Arindam Mondal <arind.mondal@samsung.com> | 2019-02-25 18:08:57 +0900 |
---|---|---|
committer | arindamm <arind.mondal@samsung.com> | 2019-02-25 18:55:50 +0900 |
commit | 3911c26a7fda32b8f3332ceb7fa3adc34b4ece62 (patch) | |
tree | b32411a7e841b78f464d63fdd94c730a4337c42e /ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core | |
parent | 7b740b078f8fb593c2615e8b6689d30ea46a0c86 (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-core/src/test/java/org/onap/portalsdk/core')
-rw-r--r-- | ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java index 8a4639b1..f0e4304c 100644 --- a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java +++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java @@ -52,12 +52,7 @@ import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; -import org.onap.portalsdk.core.domain.support.Container; -import org.onap.portalsdk.core.domain.support.Domain; -import org.onap.portalsdk.core.domain.support.Element; -import org.onap.portalsdk.core.domain.support.ElementDetails; -import org.onap.portalsdk.core.domain.support.Layout; -import org.onap.portalsdk.core.domain.support.Position; +import org.onap.portalsdk.core.domain.support.*; import org.onap.portalsdk.core.util.SystemProperties; import org.onap.portalsdk.core.util.YamlUtils; import org.powermock.api.mockito.PowerMockito; @@ -242,7 +237,7 @@ public class ElementMapServiceTest { String domain = "Test Domain"; String name = "Test Container"; - ElementDetails elementDetails = new ElementDetails(logicalName,"test","test","test","test","test","test","test","test","test"); + ElementDetails elementDetails = new ElementDetails.ElementDetailsBuilder().setLogical_group(logicalName).setDisplay_longname("test").setDescription("test").setPrimary_function("test").setNetwork_function("test").setKey_interfaces("test").setLocation("test").setVendor("test").setVendor_shortname("test").setEnclosingContainer("test").createElementDetails(); element.setDetails(elementDetails); Field field = elementMapService.getClass().getDeclaredField("elementMap"); @@ -287,7 +282,7 @@ public class ElementMapServiceTest { String domain = "Test Domain"; String name = "Test Container"; - ElementDetails elementDetails = new ElementDetails(logicalName,"test","test","test","test","test","test","test","test","test"); + ElementDetails elementDetails = new ElementDetails.ElementDetailsBuilder().setLogical_group(logicalName).setDisplay_longname("test").setDescription("test").setPrimary_function("test").setNetwork_function("test").setKey_interfaces("test").setLocation("test").setVendor("test").setVendor_shortname("test").setEnclosingContainer("test").createElementDetails(); element.setDetails(elementDetails); Field field = elementMapService.getClass().getDeclaredField("elementMap"); |