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-core/src/test | |
parent | a54a41c107279a760ee4fa122141cc21fe150200 (diff) | |
parent | 3911c26a7fda32b8f3332ceb7fa3adc34b4ece62 (diff) |
Merge "Reduce method parameter by implementing builder"
Diffstat (limited to 'ecomp-sdk/epsdk-core/src/test')
-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"); |