summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
authorManoop Talasila <talasila@research.att.com>2019-07-09 15:16:05 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-09 15:16:05 +0000
commit992fffffb3ef620466160c989c874dc8f5227536 (patch)
treecb1c0f83db3e8ad33698803a4ae709b956cd00e4 /ecomp-sdk
parentdb8a8f92e922e98b77a152af0f03fde57dd1fb44 (diff)
parentaad3703c8fe9929c71f9a9465a701f56dd1cbd5a (diff)
Merge "Fix sonar issue in epsdk-domain"
Diffstat (limited to 'ecomp-sdk')
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java21
-rw-r--r--ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/ElementMapServiceTest.java43
-rw-r--r--ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Container.java88
-rw-r--r--ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ContainerTest.java57
-rw-r--r--ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/DomainTest.java24
-rw-r--r--ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/LayoutTest.java72
6 files changed, 245 insertions, 60 deletions
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java
index 7fdc5609..b126d822 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java
@@ -580,7 +580,11 @@ public class ElementMapService {
columns = computeColumns(containerElementsMap.keySet());
}
- Container thisContainer = new Container(id, name, rows, columns, 1, 4, 8, 12, 1, 2);
+ Container thisContainer = new Container.ContainerBuilder().setId(id).setName(name)
+ .setNumOfRows(rows).setNumOfCols(columns).setInterEleWd(1).setInterEleH(4)
+ .setInterEleToContainerWd(8).setInterEleToContainerH(12)
+ .setInterEleToInnerContainerWd(1).setInterEleToInnerContainerH(2)
+ .createContainer();
thisContainer.setElements(containerElementsMap);
return thisContainer;
@@ -603,7 +607,11 @@ public class ElementMapService {
columns = computeColumns(containerElementsMap.keySet());
}
- Container thisContainer = new Container(id, name, rows, columns, 2, 6, 2, 5, 0, 0);
+ Container thisContainer = new Container.ContainerBuilder().setId(id).setName(name)
+ .setNumOfRows(rows).setNumOfCols(columns).setInterEleWd(2).setInterEleH(6)
+ .setInterEleToContainerWd(2).setInterEleToContainerH(5)
+ .setInterEleToInnerContainerWd(0).setInterEleToInnerContainerH(0)
+ .createContainer();
thisContainer.setElements(containerElementsMap);
thisContainer.setInnerContainer(innerContainersMap);
@@ -864,8 +872,13 @@ public class ElementMapService {
if (domain.equalsIgnoreCase(domainName)) {
String rowColumnKey = "";
- Container eachContainer = new Container(domainName + ":" + elementName, elementName, 1, 1, 3, 6, 2,
- 5, 0, 0);
+ Container eachContainer =
+ new Container.ContainerBuilder().setId(domainName + ":" + elementName)
+ .setName(elementName).setNumOfRows(1).setNumOfCols(1)
+ .setInterEleWd(3).setInterEleH(6).setInterEleToContainerWd(2)
+ .setInterEleToContainerH(5).setInterEleToInnerContainerWd(0)
+ .setInterEleToInnerContainerH(0).createContainer();
+
int count = 0;
while (count <= 9) {
if (thisContainersMap.containsKey(String.valueOf(count).concat(String.valueOf(count)))) {
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);
diff --git a/ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Container.java b/ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Container.java
index 3d9ee77a..1c122491 100644
--- a/ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Container.java
+++ b/ecomp-sdk/epsdk-domain/src/main/java/org/onap/portalsdk/core/domain/support/Container.java
@@ -40,6 +40,7 @@ package org.onap.portalsdk.core.domain.support;
import java.util.List;
import java.util.Map;
+
public class Container {
String id;
@@ -90,22 +91,77 @@ public class Container {
}
- public Container(String id, String name, int numOfRows, int numOfCols, double interEleWd, double interEleH,
- double interEleToContainerWd, double interEleToContainerH, double interEleToInnerContainerWd,
- double interEleToInnerContainerH) {
-
- this.id = id;
- this.name = name;
- this.numOfRows = numOfRows;
- this.numOfCols = numOfCols;
- this.interEleWd = interEleWd;
- this.interEleH = interEleH;
- this.interEleToContainerWd = interEleToContainerWd;
- this.interEleToContainerH = interEleToContainerH;
- this.interEleToInnerContainerWd = interEleToInnerContainerWd;
- this.interEleToInnerContainerH = interEleToInnerContainerH;
-
- }
+ public Container(ContainerBuilder builder) {
+ this.id = builder.container.id;
+ this.name = builder.container.name;
+ this.numOfRows = builder.container.numOfRows;
+ this.numOfCols = builder.container.numOfCols;
+ this.interEleWd = builder.container.interEleWd;
+ this.interEleH = builder.container.interEleH;
+ this.interEleToContainerWd = builder.container.interEleToContainerWd;
+ this.interEleToContainerH = builder.container.interEleToContainerH;
+ this.interEleToInnerContainerWd = builder.container.interEleToInnerContainerWd;
+ this.interEleToInnerContainerH = builder.container.interEleToInnerContainerH;
+ }
+
+ public static class ContainerBuilder {
+
+ private final Container container = new Container();
+
+ public ContainerBuilder setId(String id) {
+ this.container.id = id;
+ return this;
+ }
+
+ public ContainerBuilder setName(String name) {
+ this.container.name = name;
+ return this;
+ }
+
+ public ContainerBuilder setNumOfRows(int numOfRows) {
+ this.container.numOfRows = numOfRows;
+ return this;
+ }
+
+ public ContainerBuilder setNumOfCols(int numOfCols) {
+ this.container.numOfCols = numOfCols;
+ return this;
+ }
+
+ public ContainerBuilder setInterEleWd(double interEleWd) {
+ this.container.interEleWd = interEleWd;
+ return this;
+ }
+
+ public ContainerBuilder setInterEleH(double interEleH) {
+ this.container.interEleH = interEleH;
+ return this;
+ }
+
+ public ContainerBuilder setInterEleToContainerWd(double interEleToContainerWd) {
+ this.container.interEleToContainerWd = interEleToContainerWd;
+ return this;
+ }
+
+ public ContainerBuilder setInterEleToContainerH(double interEleToContainerH) {
+ this.container.interEleToContainerH = interEleToContainerH;
+ return this;
+ }
+
+ public ContainerBuilder setInterEleToInnerContainerWd(double interEleToInnerContainerWd) {
+ this.container.interEleToInnerContainerWd = interEleToInnerContainerWd;
+ return this;
+ }
+
+ public ContainerBuilder setInterEleToInnerContainerH(double interEleToInnerContainerH) {
+ this.container.interEleToInnerContainerH = interEleToInnerContainerH;
+ return this;
+ }
+
+ public Container createContainer() {
+ return new Container(this);
+ }
+ }
public Map<String, Container> getContainerRowCol() {
return containerRowCol;
diff --git a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ContainerTest.java b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ContainerTest.java
index c468bec6..6f5b4777 100644
--- a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ContainerTest.java
+++ b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/ContainerTest.java
@@ -49,15 +49,11 @@ import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.MockitoAnnotations;
import org.onap.portalsdk.core.domain.User;
-import org.onap.portalsdk.core.domain.support.Container;
-import org.onap.portalsdk.core.domain.support.Element;
-import org.onap.portalsdk.core.domain.support.Position;
-import org.onap.portalsdk.core.domain.support.Size;
public class ContainerTest {
@InjectMocks
- Container container = new Container();
+ Container container = new Container.ContainerBuilder().createContainer();
@Before
@@ -74,8 +70,12 @@ public class ContainerTest {
private static final double DELTA = 1e-15;
public Container mockContainer(){
- Container container = new Container("test","test",1,1,10,10,10,10,10,10);
-
+ Container container = new Container.ContainerBuilder().setId("test").setName("test")
+ .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10)
+ .setInterEleToContainerWd(10).setInterEleToContainerH(10)
+ .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10)
+ .createContainer();
+
Size size = new Size();
size.setHeight(10);
size.setWidth(10);
@@ -107,8 +107,12 @@ public class ContainerTest {
public void containerTest(){
Container container = mockContainer();
- Container container1 = new Container("test","test",1,1,10,10,10,10,10,10);
-
+ Container container1 = new Container.ContainerBuilder().setId("test").setName("test")
+ .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10)
+ .setInterEleToContainerWd(10).setInterEleToContainerH(10)
+ .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10)
+ .createContainer();
+
Size size1 = new Size();
size1.setHeight(10);
size1.setWidth(10);
@@ -139,14 +143,21 @@ public class ContainerTest {
public void computeSizeTest(){
Map<String, Container> containerRowCol = new HashMap<>();
- Container container = new Container("test","test",1,1,10,10,10,10,10,10);
+ Container container = 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", container);
Map<String, Element> elementRowCol = new HashMap<>();
Element element = new Element("1", "test");
elementRowCol.put("00", element);
-
- Container containerTest = new Container("test","Broadworks complex",1,1,10,10,10,10,10,10);
+
+ Container containerTest = new Container.ContainerBuilder().setId("test").setName("Broadworks complex")
+ .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10)
+ .setInterEleToContainerWd(10).setInterEleToContainerH(10)
+ .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10)
+ .createContainer();
containerTest.setElements(elementRowCol);
containerTest.setInnerContainer(containerRowCol);
Size size = containerTest.computeSize();
@@ -158,18 +169,30 @@ public class ContainerTest {
public void computeElementPositionsTest(){
Map<String, Container> containerRowCol = new HashMap<>();
- Container container00 = new Container("test","test",1,1,10,10,10,10,10,10);
- Container container01 = 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();
+ 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();
containerRowCol.put("00", container00);
containerRowCol.put("10", container01);
containerRowCol.put("11", container01);
-
+
Map<String, Element> elementRowCol = new HashMap<>();
Element element = new Element("1", "test");
elementRowCol.put("01", element);
elementRowCol.put("02", element);
-
- Container containerTest = new Container("test","Broadworks complex",2,3,10,10,10,10,10,10);
+
+ Container containerTest = new Container.ContainerBuilder().setId("test")
+ .setName("Broadworks complex").setNumOfRows(2).setNumOfCols(3).setInterEleWd(10)
+ .setInterEleH(10).setInterEleToContainerWd(10).setInterEleToContainerH(10)
+ .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10)
+ .createContainer();
Position position = new Position();
position.setX(10);
position.setY(10);
diff --git a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/DomainTest.java b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/DomainTest.java
index 016cd3f9..f7f32100 100644
--- a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/DomainTest.java
+++ b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/DomainTest.java
@@ -110,7 +110,11 @@ public class DomainTest {
new Domain.DomainBuilder().setId("test").setName("VNI").setInterContWd(0).setInterContH(0).setDomainToLayoutWd(0)
.setDomainToLayoutH(0).setDomainToContH(0).setNumOfRowsofContainer(2).setNumOfColsofContainer(2)
.createDomain();
- Container container = new Container("test","test",1,1,10,10,10,10,10,10);
+ Container container = 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, Container> containerRowCol = new HashMap<>();
containerRowCol.put("00", container);
containerRowCol.put("10", container);
@@ -125,7 +129,11 @@ public class DomainTest {
new Domain.DomainBuilder().setId("test").setName("XYZ").setInterContWd(0).setInterContH(0).setDomainToLayoutWd(0)
.setDomainToLayoutH(0).setDomainToContH(0).setNumOfRowsofContainer(2).setNumOfColsofContainer(2)
.createDomain();
- Container container = new Container("test","test",1,1,10,10,10,10,10,10);
+ Container container = 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, Container> containerRowCol = new HashMap<>();
containerRowCol.put("00", container);
containerRowCol.put("10", container);
@@ -138,8 +146,16 @@ public class DomainTest {
@Test
public void computeConatinerPositionsTest(){
Map<String, Container> containerRowCol = new HashMap<>();
- Container container00 = new Container("test","test",1,1,10,10,10,10,10,10);
- Container container01 = 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();
+ 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();
containerRowCol.put("00", container00);
containerRowCol.put("10", container01);
containerRowCol.put("11", container01);
diff --git a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/LayoutTest.java b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/LayoutTest.java
index 1573da86..a5e1ea6d 100644
--- a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/LayoutTest.java
+++ b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/support/LayoutTest.java
@@ -104,7 +104,11 @@ public class LayoutTest {
.setDomainToLayoutH(0).setDomainToContH(0).setNumOfRowsofContainer(2).setNumOfColsofContainer(2)
.createDomain();
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();
Position position = new Position();
position.setX(10);
position.setY(10);
@@ -135,7 +139,11 @@ public class LayoutTest {
.setDomainToLayoutH(0).setDomainToContH(0).setNumOfRowsofContainer(2).setNumOfColsofContainer(2)
.createDomain();
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();
Position position = new Position();
position.setX(10);
position.setY(10);
@@ -166,7 +174,11 @@ public class LayoutTest {
.setDomainToLayoutH(0).setDomainToContH(0).setNumOfRowsofContainer(2).setNumOfColsofContainer(2)
.createDomain();
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();
Position position = new Position();
position.setX(10);
position.setY(10);
@@ -197,7 +209,11 @@ public class LayoutTest {
.setDomainToLayoutH(0).setDomainToContH(0).setNumOfRowsofContainer(2).setNumOfColsofContainer(2)
.createDomain();
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();
Position position = new Position();
position.setX(10);
position.setY(10);
@@ -236,11 +252,19 @@ public class LayoutTest {
domainRowCol.put("00", domain);
Map<String, Container> innerContainerRowCol = new HashMap<>();
- Container innerContainer = new Container("test","test",1,1,10,10,10,10,10,10);
+ Container innerContainer = new Container.ContainerBuilder().setId("test").setName("test")
+ .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10)
+ .setInterEleToContainerWd(10).setInterEleToContainerH(10)
+ .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10)
+ .createContainer();
innerContainerRowCol.put("00", innerContainer);
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.setInnerContainer(innerContainerRowCol);
containerRowCol.put("00", container00);
@@ -274,11 +298,19 @@ public class LayoutTest {
domainRowCol.put("00", domain);
Map<String, Container> innerContainerRowCol = new HashMap<>();
- Container innerContainer = new Container("test","test",1,1,10,10,10,10,10,10);
+ Container innerContainer = new Container.ContainerBuilder().setId("test").setName("test")
+ .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10)
+ .setInterEleToContainerWd(10).setInterEleToContainerH(10)
+ .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10)
+ .createContainer();
innerContainerRowCol.put("00", innerContainer);
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.setInnerContainer(innerContainerRowCol);
containerRowCol.put("00", container00);
@@ -310,11 +342,19 @@ public class LayoutTest {
domainRowCol.put("00", domain);
Map<String, Container> innerContainerRowCol = new HashMap<>();
- Container innerContainer = new Container("test","test",1,1,10,10,10,10,10,10);
+ Container innerContainer = new Container.ContainerBuilder().setId("test").setName("test")
+ .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10)
+ .setInterEleToContainerWd(10).setInterEleToContainerH(10)
+ .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10)
+ .createContainer();
innerContainerRowCol.put("00", innerContainer);
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.setInnerContainer(innerContainerRowCol);
containerRowCol.put("00", container00);
@@ -345,11 +385,19 @@ public class LayoutTest {
domainRowCol.put("00", domain);
Map<String, Container> innerContainerRowCol = new HashMap<>();
- Container innerContainer = new Container("test","test",1,1,10,10,10,10,10,10);
+ Container innerContainer = new Container.ContainerBuilder().setId("test").setName("test")
+ .setNumOfRows(1).setNumOfCols(1).setInterEleWd(10).setInterEleH(10)
+ .setInterEleToContainerWd(10).setInterEleToContainerH(10)
+ .setInterEleToInnerContainerWd(10).setInterEleToInnerContainerH(10)
+ .createContainer();
innerContainerRowCol.put("00", innerContainer);
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.setInnerContainer(innerContainerRowCol);
containerRowCol.put("00", container00);