diff options
Diffstat (limited to 'common-be')
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 |