summaryrefslogtreecommitdiffstats
path: root/catalog-model
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-10-18 16:45:59 +0300
committerYuli Shlosberg <ys9693@att.com>2017-10-22 10:35:54 +0000
commit914a63fedde46ac22466bd114f11ba35266fde28 (patch)
treebe8cd09c75edddba7dad0694700f941c1db817c7 /catalog-model
parent56f02056947bd1bfd4310c86401113062cf3a74e (diff)
add more unit tests to BE components
Change-Id: Ic14375454aac2960cd9b250e98991ca073e17a24 Issue-Id: SDC-467 Signed-off-by: Yuli Shlosberg <ys9693@att.com> (cherry picked from commit 8c4c1dd56dedace1c59d32f5c51c285da05301bf)
Diffstat (limited to 'catalog-model')
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/category/CategoryDefinitionTest.java2
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/datamodel/NodeTypeTest.java175
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/datamodel/ToscaElementTypeEnumTest.java28
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/enums/JsonConstantKeysEnumTest.java24
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/EqualConstraintTest.java31
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/GreaterThanConstraintTest.java39
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/InRangeConstraintTest.java61
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/LengthConstraintTest.java38
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/LessOrEqualConstraintTest.java41
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/MaxLengthConstraintTest.java36
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraintTest.java38
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/PatternConstraintTest.java25
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/ValidValuesConstraintTest.java43
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/BooleanConverterTest.java39
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DataTypePropertyConverterTest.java364
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DefaultConverterTest.java39
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/FloatConverterTest.java27
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatBooleanConverterTest.java29
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatCommaDelimitedListConverterTest.java29
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverterTest.java29
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatNumberConverterTest.java29
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverterTest.java36
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/IntegerConverterTest.java48
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/JsonConverterTest.java39
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ListConverterTest.java36
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/MapConverterTest.java48
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/StringConvertorTest.java28
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaBooleanConverterTest.java27
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaFloatConverterTest.java29
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaJsonValueConverterTest.java39
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverterTest.java29
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaStringConvertorTest.java39
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaValueDefaultConverterTest.java39
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/version/ComparableVersionTest.java64
34 files changed, 1504 insertions, 163 deletions
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/category/CategoryDefinitionTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/category/CategoryDefinitionTest.java
index 6d0f192d1c..3bb589a976 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/category/CategoryDefinitionTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/category/CategoryDefinitionTest.java
@@ -5,6 +5,8 @@ import java.util.List;
import javax.annotation.Generated;
import org.junit.Test;
+import java.util.*;
+import org.junit.Assert;
public class CategoryDefinitionTest {
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/datamodel/NodeTypeTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/datamodel/NodeTypeTest.java
new file mode 100644
index 0000000000..ba7b253463
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/datamodel/NodeTypeTest.java
@@ -0,0 +1,175 @@
+package org.openecomp.sdc.be.model.jsontitan.datamodel;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.elements.InterfaceDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.ListCapabilityDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.ListRequirementDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.MapPropertiesDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
+
+
+public class NodeTypeTest {
+
+ private NodeType createTestSubject() {
+ return new NodeType();
+ }
+
+
+ @Test
+ public void testGetDerivedList() throws Exception {
+ NodeType testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getDerivedList();
+ }
+
+
+ @Test
+ public void testSetDerivedList() throws Exception {
+ NodeType testSubject;
+ List<String> derivedList = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDerivedList(derivedList);
+ }
+
+
+ @Test
+ public void testGetDerivedFrom() throws Exception {
+ NodeType testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getDerivedFrom();
+ }
+
+
+ @Test
+ public void testSetDerivedFrom() throws Exception {
+ NodeType testSubject;
+ List<String> derivedFrom = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDerivedFrom(derivedFrom);
+ }
+
+
+ @Test
+ public void testGetAttributes() throws Exception {
+ NodeType testSubject;
+ Map<String, PropertyDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getAttributes();
+ }
+
+
+ @Test
+ public void testSetAttributes() throws Exception {
+ NodeType testSubject;
+ Map<String, PropertyDataDefinition> attributes = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setAttributes(attributes);
+ }
+
+
+ @Test
+ public void testGetCapabilties() throws Exception {
+ NodeType testSubject;
+ Map<String, ListCapabilityDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getCapabilties();
+ }
+
+
+ @Test
+ public void testSetCapabilties() throws Exception {
+ NodeType testSubject;
+ Map<String, ListCapabilityDataDefinition> capabilties = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCapabilties(capabilties);
+ }
+
+
+ @Test
+ public void testGetRequirements() throws Exception {
+ NodeType testSubject;
+ Map<String, ListRequirementDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRequirements();
+ }
+
+
+ @Test
+ public void testSetRequirements() throws Exception {
+ NodeType testSubject;
+ Map<String, ListRequirementDataDefinition> requirements = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRequirements(requirements);
+ }
+
+
+ @Test
+ public void testGetCapabiltiesProperties() throws Exception {
+ NodeType testSubject;
+ Map<String, MapPropertiesDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getCapabiltiesProperties();
+ }
+
+
+ @Test
+ public void testSetCapabiltiesProperties() throws Exception {
+ NodeType testSubject;
+ Map<String, MapPropertiesDataDefinition> capabiltiesProperties = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCapabiltiesProperties(capabiltiesProperties);
+ }
+
+
+ @Test
+ public void testGetInterfaceArtifacts() throws Exception {
+ NodeType testSubject;
+ Map<String, InterfaceDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getInterfaceArtifacts();
+ }
+
+
+ @Test
+ public void testSetInterfaceArtifacts() throws Exception {
+ NodeType testSubject;
+ Map<String, InterfaceDataDefinition> interfaceArtifacts = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setInterfaceArtifacts(interfaceArtifacts);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/datamodel/ToscaElementTypeEnumTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/datamodel/ToscaElementTypeEnumTest.java
new file mode 100644
index 0000000000..671eeb2219
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/datamodel/ToscaElementTypeEnumTest.java
@@ -0,0 +1,28 @@
+package org.openecomp.sdc.be.model.jsontitan.datamodel;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
+
+
+public class ToscaElementTypeEnumTest {
+
+ private ToscaElementTypeEnum createTestSubject() {
+ return ToscaElementTypeEnum.TopologyTemplate;
+ }
+
+
+
+
+
+ @Test
+ public void testGetValue() throws Exception {
+ ToscaElementTypeEnum testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getValue();
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/enums/JsonConstantKeysEnumTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/enums/JsonConstantKeysEnumTest.java
new file mode 100644
index 0000000000..11faa42b79
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/enums/JsonConstantKeysEnumTest.java
@@ -0,0 +1,24 @@
+package org.openecomp.sdc.be.model.jsontitan.enums;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class JsonConstantKeysEnumTest {
+
+ private JsonConstantKeysEnum createTestSubject() {
+ return JsonConstantKeysEnum.COMPOSITION;
+ }
+
+
+ @Test
+ public void testGetValue() throws Exception {
+ JsonConstantKeysEnum testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getValue();
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/EqualConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/EqualConstraintTest.java
new file mode 100644
index 0000000000..8978c405b0
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/EqualConstraintTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.sdc.be.model.tosca.constraints;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.tosca.ToscaType;
+
+
+public class EqualConstraintTest {
+
+ private EqualConstraint createTestSubject() {
+ return new EqualConstraint("");
+ }
+
+
+
+
+ @Test
+ public void testValidate() throws Exception {
+ EqualConstraint testSubject;
+ Object propertyValue = null;
+
+ // test 1
+ testSubject = createTestSubject();
+ propertyValue = null;
+ testSubject.validate(propertyValue);
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/GreaterThanConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/GreaterThanConstraintTest.java
new file mode 100644
index 0000000000..001b09c517
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/GreaterThanConstraintTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.sdc.be.model.tosca.constraints;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.tosca.ToscaType;
+
+public class GreaterThanConstraintTest {
+
+ private GreaterThanConstraint createTestSubject() {
+ return new GreaterThanConstraint("");
+ }
+
+
+
+
+
+
+ @Test
+ public void testGetGreaterThan() throws Exception {
+ GreaterThanConstraint testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getGreaterThan();
+ }
+
+
+ @Test
+ public void testSetGreaterThan() throws Exception {
+ GreaterThanConstraint testSubject;
+ String greaterThan = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setGreaterThan(greaterThan);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/InRangeConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/InRangeConstraintTest.java
new file mode 100644
index 0000000000..f7a040cf94
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/InRangeConstraintTest.java
@@ -0,0 +1,61 @@
+package org.openecomp.sdc.be.model.tosca.constraints;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.tosca.ToscaType;
+
+
+public class InRangeConstraintTest {
+
+ private InRangeConstraint createTestSubject() {
+ return new InRangeConstraint(null);
+ }
+
+
+
+
+
+ @Test
+ public void testGetRangeMinValue() throws Exception {
+ InRangeConstraint testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRangeMinValue();
+ }
+
+
+ @Test
+ public void testSetRangeMinValue() throws Exception {
+ InRangeConstraint testSubject;
+ String minValue = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRangeMinValue(minValue);
+ }
+
+
+ @Test
+ public void testGetRangeMaxValue() throws Exception {
+ InRangeConstraint testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRangeMaxValue();
+ }
+
+
+ @Test
+ public void testSetRangeMaxValue() throws Exception {
+ InRangeConstraint testSubject;
+ String maxValue = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRangeMaxValue(maxValue);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/LengthConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/LengthConstraintTest.java
new file mode 100644
index 0000000000..87781f0260
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/LengthConstraintTest.java
@@ -0,0 +1,38 @@
+package org.openecomp.sdc.be.model.tosca.constraints;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class LengthConstraintTest {
+
+ private LengthConstraint createTestSubject() {
+ return new LengthConstraint();
+ }
+
+
+
+
+
+ @Test
+ public void testGetLength() throws Exception {
+ LengthConstraint testSubject;
+ Integer result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getLength();
+ }
+
+
+ @Test
+ public void testSetLength() throws Exception {
+ LengthConstraint testSubject;
+ Integer length = 0;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setLength(length);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/LessOrEqualConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/LessOrEqualConstraintTest.java
new file mode 100644
index 0000000000..6430802948
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/LessOrEqualConstraintTest.java
@@ -0,0 +1,41 @@
+package org.openecomp.sdc.be.model.tosca.constraints;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.tosca.ToscaType;
+
+
+public class LessOrEqualConstraintTest {
+
+ private LessOrEqualConstraint createTestSubject() {
+ return new LessOrEqualConstraint("");
+ }
+
+
+
+
+
+
+
+ @Test
+ public void testGetLessOrEqual() throws Exception {
+ LessOrEqualConstraint testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getLessOrEqual();
+ }
+
+
+ @Test
+ public void testSetLessOrEqual() throws Exception {
+ LessOrEqualConstraint testSubject;
+ String lessOrEqual = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setLessOrEqual(lessOrEqual);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/MaxLengthConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/MaxLengthConstraintTest.java
new file mode 100644
index 0000000000..ae0a50612d
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/MaxLengthConstraintTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.sdc.be.model.tosca.constraints;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class MaxLengthConstraintTest {
+
+ private MaxLengthConstraint createTestSubject() {
+ return new MaxLengthConstraint(null);
+ }
+
+
+
+ @Test
+ public void testGetMaxLength() throws Exception {
+ MaxLengthConstraint testSubject;
+ Integer result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getMaxLength();
+ }
+
+
+ @Test
+ public void testSetMaxLength() throws Exception {
+ MaxLengthConstraint testSubject;
+ Integer maxLength = 0;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setMaxLength(maxLength);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraintTest.java
new file mode 100644
index 0000000000..4263a6fe28
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraintTest.java
@@ -0,0 +1,38 @@
+package org.openecomp.sdc.be.model.tosca.constraints;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class MinLengthConstraintTest {
+
+ private MinLengthConstraint createTestSubject() {
+ return new MinLengthConstraint(null);
+ }
+
+
+
+
+
+ @Test
+ public void testGetMinLength() throws Exception {
+ MinLengthConstraint testSubject;
+ Integer result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getMinLength();
+ }
+
+
+ @Test
+ public void testSetMinLength() throws Exception {
+ MinLengthConstraint testSubject;
+ Integer minLength = 0;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setMinLength(minLength);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/PatternConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/PatternConstraintTest.java
new file mode 100644
index 0000000000..1a20abbace
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/PatternConstraintTest.java
@@ -0,0 +1,25 @@
+package org.openecomp.sdc.be.model.tosca.constraints;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class PatternConstraintTest {
+
+ private PatternConstraint createTestSubject() {
+ return new PatternConstraint();
+ }
+
+
+ @Test
+ public void testSetPattern() throws Exception {
+ PatternConstraint testSubject;
+ String pattern = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setPattern(pattern);
+ }
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/ValidValuesConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/ValidValuesConstraintTest.java
new file mode 100644
index 0000000000..93622300c4
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/ValidValuesConstraintTest.java
@@ -0,0 +1,43 @@
+package org.openecomp.sdc.be.model.tosca.constraints;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.tosca.ToscaType;
+
+
+public class ValidValuesConstraintTest {
+
+ private ValidValuesConstraint createTestSubject() {
+ return new ValidValuesConstraint(null);
+ }
+
+
+
+
+
+
+
+ @Test
+ public void testGetValidValues() throws Exception {
+ ValidValuesConstraint testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getValidValues();
+ }
+
+
+ @Test
+ public void testSetValidValues() throws Exception {
+ ValidValuesConstraint testSubject;
+ List<String> validValues = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setValidValues(validValues);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/BooleanConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/BooleanConverterTest.java
new file mode 100644
index 0000000000..a37e8f6b4f
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/BooleanConverterTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class BooleanConverterTest {
+
+ private BooleanConverter createTestSubject() {
+ return BooleanConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ BooleanConverter result;
+
+ // default test
+ result = BooleanConverter.getInstance();
+ }
+
+
+ @Test
+ public void testConvertToToscaValue() throws Exception {
+ BooleanConverter testSubject;
+ String value = "";
+ String innerType = "";
+ Map<String, DataTypeDefinition> dataTypes = null;
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.convertToToscaValue(value, innerType, dataTypes);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DataTypePropertyConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DataTypePropertyConverterTest.java
index 84f2254bbb..ebb7566611 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DataTypePropertyConverterTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DataTypePropertyConverterTest.java
@@ -1,5 +1,8 @@
package org.openecomp.sdc.be.model.tosca.converters;
+import static org.junit.Assert.*;
+
+import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import org.junit.Before;
import org.junit.Test;
@@ -14,174 +17,225 @@ import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import java.util.*;
+import org.junit.Assert;
public class DataTypePropertyConverterTest {
- private static final String EMPTY_JSON_STR = "{}";
- public static final String PROPERTY2_DEFAULT = "{\"prop1\":\"def1\",\"prop3\":\"def3\"}";
- private DataTypePropertyConverter testInstance = DataTypePropertyConverter.getInstance();
- private Map<String, DataTypeDefinition> dataTypes;
- private DataTypeDefinition noDefaultValue, dataType1, dataType2, dataType3;
- private PropertyDefinition prop1, prop2, prop3, noDefaultProp;
-
- @Before
- public void setUp() throws Exception {
- dataTypes = new HashMap<>();
-
- prop1 = new PropertyDefinition();
- prop1.setDefaultValue("def1");
- prop1.setName("prop1");
-
- prop2 = new PropertyDefinition();
- prop2.setType("dataType1");
- prop2.setName("prop2");
-
- prop3 = new PropertyDefinition();
- prop3.setDefaultValue("def3");
- prop3.setName("prop3");
-
- noDefaultProp = new PropertyDefinition();
- noDefaultProp.setName("noDefaultProp");
-
- noDefaultValue = new DataTypeDefinition();
- noDefaultValue.setProperties(Collections.singletonList(noDefaultProp));
-
- dataType1 = new DataTypeDefinition();
- dataType1.setProperties(Arrays.asList(prop1, prop3));
-
- dataType2 = new DataTypeDefinition();
- dataType2.setDerivedFrom(dataType1);
-
- dataType3 = new DataTypeDefinition();
- dataType3.setProperties(Collections.singletonList(prop2));
- dataType3.setDerivedFrom(noDefaultValue);
-
- dataTypes.put("noDefault", noDefaultValue);
- dataTypes.put("dataType1", dataType1);
- dataTypes.put("dataType2", dataType2);
- dataTypes.put("dataType3", dataType3);
- }
-
- @Test
- public void testGetPropertyDefaultValuesRec_dataTypeNotExist() throws Exception {
- String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("someType", dataTypes);
- assertEquals(EMPTY_JSON_STR, defaultValue);
- }
-
- @Test
- public void testGetPropertyDefaultValuesRec_NoDefaultValue() throws Exception {
- String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("noDefault", dataTypes);
- assertEquals(EMPTY_JSON_STR, defaultValue);
- }
-
- @Test
- public void testGetPropertyDefaultValuesRec() throws Exception {
- String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType1", dataTypes);
- assertEquals(PROPERTY2_DEFAULT, defaultValue);
- }
-
- @Test
- public void testGetPropertyDefaultValuesRec_defaultFromDerivedDataType_derivedDataTypeHasNoDefaults() throws Exception {
- dataType2.setDerivedFrom(noDefaultValue);
- String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType2", dataTypes);
- assertEquals(EMPTY_JSON_STR, defaultValue);
- }
-
- @Test
- public void testGetPropertyDefaultValuesRec_defaultFromDerivedDataType() throws Exception {
- String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType2", dataTypes);
- assertEquals(PROPERTY2_DEFAULT, defaultValue);
- }
-
- @Test
- public void testGetPropertyDefaultValuesRec_defaultFromDataTypesOfProperties_dataTypeOfPropertyHasNoDefault() throws Exception {
- dataType3.getProperties().get(0).setType(noDefaultValue.getName());
- String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType3", dataTypes);
- assertEquals(EMPTY_JSON_STR, defaultValue);
- }
-
- @Test
- public void testGetPropertyDefaultValuesRec_defaultFromDataTypesOfProperties() throws Exception {
- String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType3", dataTypes);
- assertEquals("{\"prop2\":" + PROPERTY2_DEFAULT + "}", defaultValue);//data type 3 has property prop2 which has a data type with property prop1 which has a default value
- }
-
- @Test
- public void testMergeDefaultValues_allDefaultValuesAreOverridden() throws Exception {
- JsonObject value = new JsonObject();
- value.addProperty(noDefaultProp.getName(), "override1");
-
- JsonObject prop1Val = new JsonObject();
- prop1Val.addProperty(prop1.getName(), "prop1Override");
-
- JsonObject prop3Val = new JsonObject();
- prop3Val.addProperty(prop3.getName(), "prop3Override");
-
- JsonObject prop2Value = new JsonObject();
- prop2Value.add(prop3.getName(), prop3Val);
- prop2Value.add(prop1.getName(), prop1Val);
-
- value.add(prop2.getName(), prop2Value);
-
- String valBeforeMerge = value.toString();
-
- testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
- assertEquals(valBeforeMerge, value.toString());
- }
-
- @Test
- public void testMergeDefaultValues() throws Exception {
- JsonObject value = new JsonObject();
- value.addProperty(noDefaultProp.getName(), "override1");
-
- JsonObject prop1Val = new JsonObject();
- prop1Val.addProperty(prop1.getName(), "prop1Override");
-
- value.add(prop2.getName(), prop1Val);
-
- testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
-
- assertEquals("{\"noDefaultProp\":\"override1\",\"prop2\":{\"prop1\":\"prop1Override\",\"prop3\":\"def3\"}}",
- value.toString());//expect to merge prop 3 default as it was not overridden
- }
-
- @Test
- public void testMergeDefaultValues_mergeAll() throws Exception {
- JsonObject value = new JsonObject();
- testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
+ private static final String EMPTY_JSON_STR = "{}";
+ public static final String PROPERTY2_DEFAULT = "{\"prop1\":\"def1\",\"prop3\":\"def3\"}";
+ private DataTypePropertyConverter testInstance = DataTypePropertyConverter.getInstance();
+ private Map<String, DataTypeDefinition> dataTypes;
+ private DataTypeDefinition noDefaultValue, dataType1, dataType2, dataType3;
+ private PropertyDefinition prop1, prop2, prop3, noDefaultProp;
+
+ @Before
+ public void setUp() throws Exception {
+ dataTypes = new HashMap<>();
+
+ prop1 = new PropertyDefinition();
+ prop1.setDefaultValue("def1");
+ prop1.setName("prop1");
+
+ prop2 = new PropertyDefinition();
+ prop2.setType("dataType1");
+ prop2.setName("prop2");
+
+ prop3 = new PropertyDefinition();
+ prop3.setDefaultValue("def3");
+ prop3.setName("prop3");
+
+ noDefaultProp = new PropertyDefinition();
+ noDefaultProp.setName("noDefaultProp");
+
+ noDefaultValue = new DataTypeDefinition();
+ noDefaultValue.setProperties(Collections.singletonList(noDefaultProp));
+
+ dataType1 = new DataTypeDefinition();
+ dataType1.setProperties(Arrays.asList(prop1, prop3));
+
+ dataType2 = new DataTypeDefinition();
+ dataType2.setDerivedFrom(dataType1);
+
+ dataType3 = new DataTypeDefinition();
+ dataType3.setProperties(Collections.singletonList(prop2));
+ dataType3.setDerivedFrom(noDefaultValue);
+
+ dataTypes.put("noDefault", noDefaultValue);
+ dataTypes.put("dataType1", dataType1);
+ dataTypes.put("dataType2", dataType2);
+ dataTypes.put("dataType3", dataType3);
+ }
+
+ @Test
+ public void testGetPropertyDefaultValuesRec_dataTypeNotExist() throws Exception {
+ String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("someType", dataTypes);
+ assertEquals(EMPTY_JSON_STR, defaultValue);
+ }
+
+ @Test
+ public void testGetPropertyDefaultValuesRec_NoDefaultValue() throws Exception {
+ String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("noDefault", dataTypes);
+ assertEquals(EMPTY_JSON_STR, defaultValue);
+ }
+
+ @Test
+ public void testGetPropertyDefaultValuesRec() throws Exception {
+ String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType1", dataTypes);
+ assertEquals(PROPERTY2_DEFAULT, defaultValue);
+ }
+
+ @Test
+ public void testGetPropertyDefaultValuesRec_defaultFromDerivedDataType_derivedDataTypeHasNoDefaults()
+ throws Exception {
+ dataType2.setDerivedFrom(noDefaultValue);
+ String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType2", dataTypes);
+ assertEquals(EMPTY_JSON_STR, defaultValue);
+ }
+
+ @Test
+ public void testGetPropertyDefaultValuesRec_defaultFromDerivedDataType() throws Exception {
+ String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType2", dataTypes);
+ assertEquals(PROPERTY2_DEFAULT, defaultValue);
+ }
+
+ @Test
+ public void testGetPropertyDefaultValuesRec_defaultFromDataTypesOfProperties_dataTypeOfPropertyHasNoDefault()
+ throws Exception {
+ dataType3.getProperties().get(0).setType(noDefaultValue.getName());
+ String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType3", dataTypes);
+ assertEquals(EMPTY_JSON_STR, defaultValue);
+ }
+
+ @Test
+ public void testGetPropertyDefaultValuesRec_defaultFromDataTypesOfProperties() throws Exception {
+ String defaultValue = testInstance.getDataTypePropertiesDefaultValuesRec("dataType3", dataTypes);
+ assertEquals("{\"prop2\":" + PROPERTY2_DEFAULT + "}", defaultValue);// data
+ // type
+ // 3
+ // has
+ // property
+ // prop2
+ // which
+ // has
+ // a
+ // data
+ // type
+ // with
+ // property
+ // prop1
+ // which
+ // has
+ // a
+ // default
+ // value
+ }
+
+ @Test
+ public void testMergeDefaultValues_allDefaultValuesAreOverridden() throws Exception {
+ JsonObject value = new JsonObject();
+ value.addProperty(noDefaultProp.getName(), "override1");
+
+ JsonObject prop1Val = new JsonObject();
+ prop1Val.addProperty(prop1.getName(), "prop1Override");
+
+ JsonObject prop3Val = new JsonObject();
+ prop3Val.addProperty(prop3.getName(), "prop3Override");
+
+ JsonObject prop2Value = new JsonObject();
+ prop2Value.add(prop3.getName(), prop3Val);
+ prop2Value.add(prop1.getName(), prop1Val);
+
+ value.add(prop2.getName(), prop2Value);
+
+ String valBeforeMerge = value.toString();
+
+ testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
+ assertEquals(valBeforeMerge, value.toString());
+ }
+
+ @Test
+ public void testMergeDefaultValues() throws Exception {
+ JsonObject value = new JsonObject();
+ value.addProperty(noDefaultProp.getName(), "override1");
+
+ JsonObject prop1Val = new JsonObject();
+ prop1Val.addProperty(prop1.getName(), "prop1Override");
+
+ value.add(prop2.getName(), prop1Val);
+
+ testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
+
+ assertEquals("{\"noDefaultProp\":\"override1\",\"prop2\":{\"prop1\":\"prop1Override\",\"prop3\":\"def3\"}}",
+ value.toString());// expect to merge prop 3 default as it was
+ // not overridden
+ }
+
+ @Test
+ public void testMergeDefaultValues_mergeAll() throws Exception {
+ JsonObject value = new JsonObject();
+ testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
+
+ assertEquals("{\"prop2\":" + PROPERTY2_DEFAULT + "}", value.toString());// expect
+ // to
+ // merge
+ // prop
+ // 3
+ // default
+ // as
+ // it
+ // was
+ // not
+ // overridden
+ }
+
+ @Test
+ public void testMergeDefaultValues_doNotAddDefaultsForGetInputValues() throws Exception {
+
+ JsonObject getInputValue = new JsonObject();
+ getInputValue.addProperty("get_input", "in1");
+
+ JsonObject value = new JsonObject();
+ value.add(prop2.getName(), getInputValue);
+
+ testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
+
+ assertEquals("{\"prop2\":{\"get_input\":\"in1\"}}", value.toString());
+ }
+
+ @Test
+ public void testMergeDefaultValues_doNotAddDefaultsForGetInputInnerValues() throws Exception {
+ JsonObject getInputValue = new JsonObject();
+ getInputValue.addProperty("get_input", "in1");
- assertEquals("{\"prop2\":" + PROPERTY2_DEFAULT + "}",
- value.toString());//expect to merge prop 3 default as it was not overridden
- }
+ JsonObject prop1Val = new JsonObject();
+ prop1Val.add(prop1.getName(), getInputValue);
- @Test
- public void testMergeDefaultValues_doNotAddDefaultsForGetInputValues() throws Exception {
+ JsonObject value = new JsonObject();
+ value.add(prop2.getName(), prop1Val);
- JsonObject getInputValue = new JsonObject();
- getInputValue.addProperty("get_input", "in1");
+ testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
- JsonObject value = new JsonObject();
- value.add(prop2.getName(), getInputValue);
+ assertEquals("{\"prop2\":{\"prop1\":{\"get_input\":\"in1\"},\"prop3\":\"def3\"}}", value.toString());
- testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
+ }
- assertEquals("{\"prop2\":{\"get_input\":\"in1\"}}", value.toString());
- }
+ private DataTypePropertyConverter createTestSubject() {
+ return DataTypePropertyConverter.getInstance();
+ }
- @Test
- public void testMergeDefaultValues_doNotAddDefaultsForGetInputInnerValues() throws Exception {
- JsonObject getInputValue = new JsonObject();
- getInputValue.addProperty("get_input", "in1");
+
+ @Test
+ public void testGetInstance() throws Exception {
+ DataTypePropertyConverter result;
- JsonObject prop1Val = new JsonObject();
- prop1Val.add(prop1.getName(), getInputValue);
+ // default test
+ result = DataTypePropertyConverter.getInstance();
+ }
- JsonObject value = new JsonObject();
- value.add(prop2.getName(), prop1Val);
+
- testInstance.mergeDataTypeDefaultValuesWithPropertyValue(value, "dataType3", dataTypes);
- assertEquals("{\"prop2\":{\"prop1\":{\"get_input\":\"in1\"},\"prop3\":\"def3\"}}", value.toString());
+
- }
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DefaultConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DefaultConverterTest.java
new file mode 100644
index 0000000000..111c4f84f1
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DefaultConverterTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class DefaultConverterTest {
+
+ private DefaultConverter createTestSubject() {
+ return DefaultConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ DefaultConverter result;
+
+ // default test
+ result = DefaultConverter.getInstance();
+ }
+
+
+ @Test
+ public void testConvert() throws Exception {
+ DefaultConverter testSubject;
+ String value = "";
+ String innerType = "";
+ Map<String, DataTypeDefinition> dataTypes = null;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.convert(value, innerType, dataTypes);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/FloatConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/FloatConverterTest.java
new file mode 100644
index 0000000000..d66182b966
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/FloatConverterTest.java
@@ -0,0 +1,27 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class FloatConverterTest {
+
+ private FloatConverter createTestSubject() {
+ return FloatConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ FloatConverter result;
+
+ // default test
+ result = FloatConverter.getInstance();
+ }
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatBooleanConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatBooleanConverterTest.java
new file mode 100644
index 0000000000..8f7aa6d849
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatBooleanConverterTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class HeatBooleanConverterTest {
+
+ private HeatBooleanConverter createTestSubject() {
+ return HeatBooleanConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ HeatBooleanConverter result;
+
+ // default test
+ result = HeatBooleanConverter.getInstance();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatCommaDelimitedListConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatCommaDelimitedListConverterTest.java
new file mode 100644
index 0000000000..9b3cb57028
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatCommaDelimitedListConverterTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class HeatCommaDelimitedListConverterTest {
+
+ private HeatCommaDelimitedListConverter createTestSubject() {
+ return HeatCommaDelimitedListConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ HeatCommaDelimitedListConverter result;
+
+ // default test
+ result = HeatCommaDelimitedListConverter.getInstance();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverterTest.java
new file mode 100644
index 0000000000..4e5ee49b6d
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatJsonConverterTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class HeatJsonConverterTest {
+
+ private HeatJsonConverter createTestSubject() {
+ return HeatJsonConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ HeatJsonConverter result;
+
+ // default test
+ result = HeatJsonConverter.getInstance();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatNumberConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatNumberConverterTest.java
new file mode 100644
index 0000000000..1594b00c77
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatNumberConverterTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class HeatNumberConverterTest {
+
+ private HeatNumberConverter createTestSubject() {
+ return HeatNumberConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ HeatNumberConverter result;
+
+ // default test
+ result = HeatNumberConverter.getInstance();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverterTest.java
index 285dd9a965..3844bc81af 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverterTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverterTest.java
@@ -1,16 +1,36 @@
package org.openecomp.sdc.be.model.tosca.converters;
-import org.junit.Test;
-
import static org.junit.Assert.assertEquals;
+import java.util.Map;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
public class HeatStringConverterTest {
- @Test
- public void convertString_strWithQuotes_returnStringAsIs() {
- String str = "'i'm string with \"quote\"'";
- String convert = HeatStringConverter.getInstance().convert(str, null, null);
- assertEquals(str, convert);
- }
+ @Test
+ public void convertString_strWithQuotes_returnStringAsIs() {
+ String str = "'i'm string with \"quote\"'";
+ String convert = HeatStringConverter.getInstance().convert(str, null, null);
+ assertEquals(str, convert);
+ }
+
+ private HeatStringConverter createTestSubject() {
+ return HeatStringConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ HeatStringConverter result;
+
+ // default test
+ result = HeatStringConverter.getInstance();
+ }
+
+
+
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/IntegerConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/IntegerConverterTest.java
new file mode 100644
index 0000000000..00bb834faf
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/IntegerConverterTest.java
@@ -0,0 +1,48 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class IntegerConverterTest {
+
+ private IntegerConverter createTestSubject() {
+ return IntegerConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ IntegerConverter result;
+
+ // default test
+ result = IntegerConverter.getInstance();
+ }
+
+
+ @Test
+ public void testConvertToToscaValue() throws Exception {
+ IntegerConverter testSubject;
+ String value = "";
+ String innerType = "";
+ Map<String, DataTypeDefinition> dataTypes = null;
+ Object result;
+
+ // test 1
+ testSubject = createTestSubject();
+ value = null;
+ result = testSubject.convertToToscaValue(value, innerType, dataTypes);
+ Assert.assertEquals(null, result);
+
+ // test 2
+ testSubject = createTestSubject();
+ value = "";
+ result = testSubject.convertToToscaValue(value, innerType, dataTypes);
+ Assert.assertEquals(null, result);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/JsonConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/JsonConverterTest.java
new file mode 100644
index 0000000000..431443ab80
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/JsonConverterTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class JsonConverterTest {
+
+ private JsonConverter createTestSubject() {
+ return JsonConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ JsonConverter result;
+
+ // default test
+ result = JsonConverter.getInstance();
+ }
+
+
+ @Test
+ public void testConvert() throws Exception {
+ JsonConverter testSubject;
+ String value = "";
+ String innerType = "";
+ Map<String, DataTypeDefinition> dataTypes = null;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.convert(value, innerType, dataTypes);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ListConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ListConverterTest.java
new file mode 100644
index 0000000000..a253ef07e8
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ListConverterTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+import fj.data.Either;
+
+
+public class ListConverterTest {
+
+ private ListConverter createTestSubject() {
+ return new ListConverter();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ ListConverter result;
+
+ // default test
+ result = ListConverter.getInstance();
+ }
+
+
+
+
+
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/MapConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/MapConverterTest.java
new file mode 100644
index 0000000000..99f5e2716f
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/MapConverterTest.java
@@ -0,0 +1,48 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+import fj.data.Either;
+
+
+public class MapConverterTest {
+
+ private MapConverter createTestSubject() {
+ return new MapConverter();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ MapConverter result;
+
+ // default test
+ result = MapConverter.getInstance();
+ }
+
+
+ @Test
+ public void testConvert() throws Exception {
+ MapConverter testSubject;
+ String value = "";
+ String innerType = "";
+ Map<String, DataTypeDefinition> dataTypes = null;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.convert(value, innerType, dataTypes);
+ }
+
+
+
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/StringConvertorTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/StringConvertorTest.java
new file mode 100644
index 0000000000..a3a142d668
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/StringConvertorTest.java
@@ -0,0 +1,28 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+public class StringConvertorTest {
+
+ private StringConvertor createTestSubject() {
+ return StringConvertor.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ StringConvertor result;
+
+ // default test
+ result = StringConvertor.getInstance();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaBooleanConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaBooleanConverterTest.java
new file mode 100644
index 0000000000..c96c1244b6
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaBooleanConverterTest.java
@@ -0,0 +1,27 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+public class ToscaBooleanConverterTest {
+
+ private ToscaBooleanConverter createTestSubject() {
+ return ToscaBooleanConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ ToscaBooleanConverter result;
+
+ // default test
+ result = ToscaBooleanConverter.getInstance();
+ }
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaFloatConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaFloatConverterTest.java
new file mode 100644
index 0000000000..a8c5aeef66
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaFloatConverterTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class ToscaFloatConverterTest {
+
+ private ToscaFloatConverter createTestSubject() {
+ return ToscaFloatConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ ToscaFloatConverter result;
+
+ // default test
+ result = ToscaFloatConverter.getInstance();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaJsonValueConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaJsonValueConverterTest.java
new file mode 100644
index 0000000000..34eae243f7
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaJsonValueConverterTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class ToscaJsonValueConverterTest {
+
+ private ToscaJsonValueConverter createTestSubject() {
+ return ToscaJsonValueConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ ToscaJsonValueConverter result;
+
+ // default test
+ result = ToscaJsonValueConverter.getInstance();
+ }
+
+
+ @Test
+ public void testConvertToToscaValue() throws Exception {
+ ToscaJsonValueConverter testSubject;
+ String value = "";
+ String innerType = "";
+ Map<String, DataTypeDefinition> dataTypes = null;
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.convertToToscaValue(value, innerType, dataTypes);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverterTest.java
new file mode 100644
index 0000000000..a713c4ce6c
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverterTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class ToscaListValueConverterTest {
+
+ private ToscaListValueConverter createTestSubject() {
+ return ToscaListValueConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ ToscaListValueConverter result;
+
+ // default test
+ result = ToscaListValueConverter.getInstance();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaStringConvertorTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaStringConvertorTest.java
new file mode 100644
index 0000000000..8365c0345a
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaStringConvertorTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class ToscaStringConvertorTest {
+
+ private ToscaStringConvertor createTestSubject() {
+ return ToscaStringConvertor.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ ToscaStringConvertor result;
+
+ // default test
+ result = ToscaStringConvertor.getInstance();
+ }
+
+
+ @Test
+ public void testConvertToToscaValue() throws Exception {
+ ToscaStringConvertor testSubject;
+ String value = "";
+ String innerType = "";
+ Map<String, DataTypeDefinition> dataTypes = null;
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.convertToToscaValue(value, innerType, dataTypes);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaValueDefaultConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaValueDefaultConverterTest.java
new file mode 100644
index 0000000000..b9ae07cb76
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaValueDefaultConverterTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+
+
+public class ToscaValueDefaultConverterTest {
+
+ private ToscaValueDefaultConverter createTestSubject() {
+ return ToscaValueDefaultConverter.getInstance();
+ }
+
+
+ @Test
+ public void testGetInstance() throws Exception {
+ ToscaValueDefaultConverter result;
+
+ // default test
+ result = ToscaValueDefaultConverter.getInstance();
+ }
+
+
+ @Test
+ public void testConvertToToscaValue() throws Exception {
+ ToscaValueDefaultConverter testSubject;
+ String value = "";
+ String innerType = "";
+ Map<String, DataTypeDefinition> dataTypes = null;
+ Object result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.convertToToscaValue(value, innerType, dataTypes);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/version/ComparableVersionTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/version/ComparableVersionTest.java
new file mode 100644
index 0000000000..5d0c34d037
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/version/ComparableVersionTest.java
@@ -0,0 +1,64 @@
+package org.openecomp.sdc.be.model.tosca.version;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class ComparableVersionTest {
+
+ private ComparableVersion createTestSubject() {
+ return new ComparableVersion("");
+ }
+
+
+ @Test
+ public void testParseVersion() throws Exception {
+ ComparableVersion testSubject;
+ String version = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.parseVersion(version);
+ }
+
+
+
+
+
+
+
+
+ @Test
+ public void testToString() throws Exception {
+ ComparableVersion testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.toString();
+ }
+
+
+ @Test
+ public void testEquals() throws Exception {
+ ComparableVersion testSubject;
+ Object o = null;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.equals(o);
+ }
+
+
+ @Test
+ public void testHashCode() throws Exception {
+ ComparableVersion testSubject;
+ int result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.hashCode();
+ }
+} \ No newline at end of file