aboutsummaryrefslogtreecommitdiffstats
path: root/common-be/src/test
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2018-08-04 20:32:31 +0300
committerTal Gitelman <tg851x@intl.att.com>2018-08-05 17:39:27 +0000
commit6e6a179914fd6b8516c697991a501535bfc53172 (patch)
tree13b39810c35d5a4ea461b408608943225aa1be0a /common-be/src/test
parent8d532a40d92455239e789aad996e699dfefd19cb (diff)
add removed unit tests
Change-Id: Iabd593d8d9ab0efeb32032d5c4d72b8fa1c27e63 Issue-ID: SDC-1590 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'common-be/src/test')
-rw-r--r--common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/CompositionDataDefinitionTest.java81
-rw-r--r--common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/MapListCapabiltyDataDefinitionTest.java46
-rw-r--r--common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/MapListRequirementDataDefinitionTest.java38
3 files changed, 165 insertions, 0 deletions
diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/CompositionDataDefinitionTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/CompositionDataDefinitionTest.java
new file mode 100644
index 0000000000..92faa74f3c
--- /dev/null
+++ b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/CompositionDataDefinitionTest.java
@@ -0,0 +1,81 @@
+package org.openecomp.sdc.be.datatypes.elements;
+
+import java.util.Map;
+
+import org.junit.Test;
+
+
+public class CompositionDataDefinitionTest {
+
+ private CompositionDataDefinition createTestSubject() {
+ return new CompositionDataDefinition();
+ }
+
+
+ @Test
+ public void testGetComponentInstances() throws Exception {
+ CompositionDataDefinition testSubject;
+ Map<String, ComponentInstanceDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getComponentInstances();
+ }
+
+
+ @Test
+ public void testSetComponentInstances() throws Exception {
+ CompositionDataDefinition testSubject;
+ Map<String, ComponentInstanceDataDefinition> componentInstances = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setComponentInstances(componentInstances);
+ }
+
+
+ @Test
+ public void testGetRelations() throws Exception {
+ CompositionDataDefinition testSubject;
+ Map<String, RelationshipInstDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRelations();
+ }
+
+
+ @Test
+ public void testSetRelations() throws Exception {
+ CompositionDataDefinition testSubject;
+ Map<String, RelationshipInstDataDefinition> relations = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRelations(relations);
+ }
+
+
+ @Test
+ public void testAddInstance() throws Exception {
+ CompositionDataDefinition testSubject;
+ String key = "";
+ ComponentInstanceDataDefinition instance = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.addInstance(key, instance);
+ }
+
+
+ @Test
+ public void testAddRelation() throws Exception {
+ CompositionDataDefinition testSubject;
+ String key = "";
+ RelationshipInstDataDefinition relation = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.addRelation(key, relation);
+ }
+} \ No newline at end of file
diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/MapListCapabiltyDataDefinitionTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/MapListCapabiltyDataDefinitionTest.java
new file mode 100644
index 0000000000..43fefcfe09
--- /dev/null
+++ b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/MapListCapabiltyDataDefinitionTest.java
@@ -0,0 +1,46 @@
+package org.openecomp.sdc.be.datatypes.elements;
+
+import org.apache.commons.collections.map.HashedMap;
+import org.junit.Test;
+
+import java.util.Map;
+
+
+public class MapListCapabiltyDataDefinitionTest {
+
+ private MapListCapabilityDataDefinition createTestSubject() {
+ return new MapListCapabilityDataDefinition();
+ }
+
+ @Test
+ public void testConstructors() throws Exception {
+ MapListCapabilityDataDefinition testSubject;
+ Map<String, ListCapabilityDataDefinition> result;
+
+ // default test
+ new MapListCapabilityDataDefinition(new HashedMap());
+ new MapListCapabilityDataDefinition(createTestSubject());
+ }
+
+ @Test
+ public void testGetMapToscaDataDefinition() throws Exception {
+ MapListCapabilityDataDefinition testSubject;
+ Map<String, ListCapabilityDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getMapToscaDataDefinition();
+ }
+
+
+ @Test
+ public void testAdd() throws Exception {
+ MapListCapabilityDataDefinition testSubject;
+ String key = "";
+ CapabilityDataDefinition value = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.add(key, value);
+ }
+} \ No newline at end of file
diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/MapListRequirementDataDefinitionTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/MapListRequirementDataDefinitionTest.java
new file mode 100644
index 0000000000..82f0e0ea06
--- /dev/null
+++ b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/MapListRequirementDataDefinitionTest.java
@@ -0,0 +1,38 @@
+package org.openecomp.sdc.be.datatypes.elements;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+
+
+public class MapListRequirementDataDefinitionTest {
+
+ private MapListRequirementDataDefinition createTestSubject() {
+ Map map = new HashMap<>();
+ return new MapListRequirementDataDefinition(map);
+ }
+
+
+ @Test
+ public void testGetMapToscaDataDefinition() throws Exception {
+ MapListRequirementDataDefinition testSubject;
+ Map<String, ListRequirementDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getMapToscaDataDefinition();
+ }
+
+
+ @Test
+ public void testAdd() throws Exception {
+ MapListRequirementDataDefinition testSubject;
+ String key = "";
+ RequirementDataDefinition value = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.add(key, value);
+ }
+} \ No newline at end of file