diff options
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 | 43 |
1 files changed, 36 insertions, 7 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 e2655b59..c7f40c3c 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 @@ -153,13 +153,21 @@ public class ElementMapServiceTest { elementRowcol.put("22", element2); Map<String, Container> containerRowCol = new HashMap<>(); - Container container00 = new Container("test","test",1,1,10,10,10,10,10,10); + Container container00 = new Container.ContainerBuilder().setId("test").setName("test") + .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10) + .setInterEleToContainerWd(10).setInterEleToContainerH(10) + .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10) + .createContainer(); container00.setElements(elementRowcol); container00.setP(position); Map<String, Container> innerContainer = new HashMap<>(); - Container container01 = new Container("test","test",1,1,10,10,10,10,10,10); + Container container01 = new Container.ContainerBuilder().setId("test").setName("test") + .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10) + .setInterEleToContainerWd(10).setInterEleToContainerH(10) + .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10) + .createContainer(); Map<String, Element> elementRowcolInner = new HashMap<>(); Element elementInner = new Element("12", "dashed"); elementInner.setP(position); @@ -304,7 +312,12 @@ public class ElementMapServiceTest { toscalEleMap.set(elementMapService, toscaElementsMap); HashMap<String, Container> innercontainerMap = new HashMap<>(); - Container container00 = new Container("test","test",1,1,10,10,10,10,10,10); + Container container00 = new Container.ContainerBuilder().setId("test").setName("test") + .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10) + .setInterEleToContainerWd(10).setInterEleToContainerH(10) + .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10) + .createContainer(); + innercontainerMap.put(domain + ":" + name, container00); Field innercontainers = elementMapService.getClass().getDeclaredField("innercontainers"); innercontainers.setAccessible(true); @@ -346,7 +359,11 @@ public class ElementMapServiceTest { toscalEleMap.set(elementMapService, toscaElementsMap); HashMap<String, Container> innercontainerMap = new HashMap<>(); - Container container00 = new Container("test","test",1,1,10,10,10,10,10,10); + Container container00 = new Container.ContainerBuilder().setId("test").setName("test") + .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10) + .setInterEleToContainerWd(10).setInterEleToContainerH(10) + .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10) + .createContainer(); innercontainerMap.put(domain + ":" + name, container00); Field innercontainers = elementMapService.getClass().getDeclaredField("innercontainers"); innercontainers.setAccessible(true); @@ -378,15 +395,27 @@ public class ElementMapServiceTest { elementRowCol.put("382", element2); Map<String, Container> containerRowCol = new HashMap<>(); - Container container023 = new Container("test","test",1,1,10,10,10,10,10,10); + Container container023 = new Container.ContainerBuilder().setId("test").setName("test") + .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10) + .setInterEleToContainerWd(10).setInterEleToContainerH(10) + .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10) + .createContainer(); containerRowCol.put("00", container023); HashMap<String, Container> outercontainerMap = new HashMap<>(); - Container container00 = new Container("test","test",1,1,10,10,10,10,10,10); + Container container00 = new Container.ContainerBuilder().setId("test").setName("test") + .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10) + .setInterEleToContainerWd(10).setInterEleToContainerH(10) + .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10) + .createContainer(); container00.setInnerContainer(containerRowCol); container00.setElements(elementRowCol); - Container container01 = new Container("test","test",1,1,10,10,10,10,10,10); + Container container01 = new Container.ContainerBuilder().setId("test").setName("test") + .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10) + .setInterEleToContainerWd(10).setInterEleToContainerH(10) + .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10) + .createContainer(); container01.setElements(elementRowCol); outercontainerMap.put(name+":", container00); outercontainerMap.put(name+":/Test", container01); |