summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src/test/java')
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/LifeCycleTransitionEnumTest.java25
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/OperationTest.java61
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/ParsedToscaYamlInfoTest.java82
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/PointTest.java4
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/PolicyDefinitionTest.java33
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/ProductTest.java4
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyScopeTest.java67
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/RelationshipInfoTest.java232
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceInstanceHeatParameterTest.java4
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java18
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/ServiceTest.java6
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/TagTest.java68
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/TargetCapabilityRelDefTest.java98
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/UploadComponentInstanceInfoTest.java153
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/IdMapperTest.java2
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/InterfaceUtilsTest.java2
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ComponentInstanceOperationTest.java10
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtilTest.java3
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/DataTypePropertyConverterTest.java15
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/LowerCaseConverterTest.java3
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaFloatConverterTest.java8
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverterTest.java6
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/MapValidatorTest.java4
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/ToscaBooleanValidatorTest.java3
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/unittests/utils/FactoryUtilsTest.java2
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/unittests/utils/ModelConfDependentTest.java13
26 files changed, 873 insertions, 53 deletions
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/LifeCycleTransitionEnumTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/LifeCycleTransitionEnumTest.java
index 43fac12509..d5fcff5cfb 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/LifeCycleTransitionEnumTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/LifeCycleTransitionEnumTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.be.model;
-import javax.annotation.Generated;
-
import org.junit.Test;
public class LifeCycleTransitionEnumTest {
@@ -10,7 +8,6 @@ public class LifeCycleTransitionEnumTest {
return LifeCycleTransitionEnum.CERTIFY;
}
-
@Test
public void testGetDisplayName() throws Exception {
LifeCycleTransitionEnum testSubject;
@@ -21,17 +18,31 @@ public class LifeCycleTransitionEnumTest {
result = testSubject.getDisplayName();
}
-
@Test
public void testGetFromDisplayName() throws Exception {
- String name = LifeCycleTransitionEnum.CHECKIN.getDisplayName() ;
+ String name = LifeCycleTransitionEnum.CHECKIN.getDisplayName();
+ LifeCycleTransitionEnum result;
+
+ // default test
+ for (LifeCycleTransitionEnum iterable_element : LifeCycleTransitionEnum.values()) {
+ result = LifeCycleTransitionEnum.getFromDisplayName(iterable_element.getDisplayName());
+ }
+ }
+
+ @Test
+ public void testGetFromDisplayNameException() throws Exception {
+ String name = LifeCycleTransitionEnum.CHECKIN.getDisplayName();
LifeCycleTransitionEnum result;
// default test
- result = LifeCycleTransitionEnum.getFromDisplayName(name);
+ try {
+ result = LifeCycleTransitionEnum.getFromDisplayName("mock");
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
}
-
@Test
public void testValuesAsString() throws Exception {
String result;
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/OperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/OperationTest.java
new file mode 100644
index 0000000000..8ff412960e
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/OperationTest.java
@@ -0,0 +1,61 @@
+package org.openecomp.sdc.be.model;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.ListDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.OperationDataDefinition;
+
+public class OperationTest {
+
+ private Operation createTestSubject() {
+ return new Operation();
+ }
+
+ @Test
+ public void testCtor() throws Exception {
+ new Operation(new OperationDataDefinition());
+ new Operation(new ArtifactDataDefinition(), "mock", new ListDataDefinition<>());
+ }
+
+ @Test
+ public void testIsDefinition() throws Exception {
+ Operation testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isDefinition();
+ }
+
+ @Test
+ public void testSetDefinition() throws Exception {
+ Operation testSubject;
+ boolean definition = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDefinition(definition);
+ }
+
+ @Test
+ public void testToString() throws Exception {
+ Operation testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.toString();
+ }
+
+ @Test
+ public void testGetImplementationArtifact() throws Exception {
+ Operation testSubject;
+ ArtifactDefinition result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getImplementationArtifact();
+ testSubject.setImplementation(new ArtifactDataDefinition());
+ result = testSubject.getImplementationArtifact();
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ParsedToscaYamlInfoTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ParsedToscaYamlInfoTest.java
new file mode 100644
index 0000000000..cec44b402e
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ParsedToscaYamlInfoTest.java
@@ -0,0 +1,82 @@
+package org.openecomp.sdc.be.model;
+
+import java.util.Map;
+
+import org.junit.Test;
+
+public class ParsedToscaYamlInfoTest {
+
+ private ParsedToscaYamlInfo createTestSubject() {
+ return new ParsedToscaYamlInfo();
+ }
+
+ @Test
+ public void testGetInstances() throws Exception {
+ ParsedToscaYamlInfo testSubject;
+ Map<String, UploadComponentInstanceInfo> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getInstances();
+ }
+
+ @Test
+ public void testSetInstances() throws Exception {
+ ParsedToscaYamlInfo testSubject;
+ Map<String, UploadComponentInstanceInfo> instances = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setInstances(instances);
+ }
+
+ @Test
+ public void testGetGroups() throws Exception {
+ ParsedToscaYamlInfo testSubject;
+ Map<String, GroupDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getGroups();
+ }
+
+ @Test
+ public void testSetGroups() throws Exception {
+ ParsedToscaYamlInfo testSubject;
+ Map<String, GroupDefinition> groups = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setGroups(groups);
+ }
+
+ @Test
+ public void testGetInputs() throws Exception {
+ ParsedToscaYamlInfo testSubject;
+ Map<String, InputDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getInputs();
+ }
+
+ @Test
+ public void testSetInputs() throws Exception {
+ ParsedToscaYamlInfo testSubject;
+ Map<String, InputDefinition> inputs = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setInputs(inputs);
+ }
+
+ @Test
+ public void testToString() throws Exception {
+ ParsedToscaYamlInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.toString();
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/PointTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/PointTest.java
index f528375b33..edf7f52fe0 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/PointTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/PointTest.java
@@ -9,6 +9,10 @@ public class PointTest {
return new Point();
}
+ @Test
+ public void testCtor() throws Exception {
+ new Point("mock", "mock");
+ }
@Test
public void testGetX() throws Exception {
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/PolicyDefinitionTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/PolicyDefinitionTest.java
new file mode 100644
index 0000000000..c7a21b844a
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/PolicyDefinitionTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.sdc.be.model;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.elements.PolicyDataDefinition;
+
+public class PolicyDefinitionTest {
+
+ private PolicyDefinition createTestSubject() {
+ return new PolicyDefinition();
+ }
+
+ @Test
+ public void testCtor() throws Exception {
+ new PolicyDefinition(new HashMap<>());
+ new PolicyDefinition(new PolicyDataDefinition());
+ PolicyTypeDefinition policyType = new PolicyTypeDefinition();
+ policyType.setProperties(new LinkedList<>());
+ new PolicyDefinition(policyType);
+ }
+
+ @Test
+ public void testGetNormalizedName() throws Exception {
+ PolicyDefinition testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getNormalizedName();
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ProductTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ProductTest.java
index 23f1ca48b3..021e044f34 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ProductTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ProductTest.java
@@ -11,6 +11,10 @@ public class ProductTest {
return new Product();
}
+ @Test
+ public void testCtor() throws Exception {
+ new Product(new ProductMetadataDefinition());
+ }
@Test
public void testGetFullName() throws Exception {
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyScopeTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyScopeTest.java
new file mode 100644
index 0000000000..825473d8ef
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyScopeTest.java
@@ -0,0 +1,67 @@
+package org.openecomp.sdc.be.model;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PropertyScopeTest {
+
+ private PropertyScope createTestSubject() {
+ return new PropertyScope();
+ }
+
+ @Test
+ public void testGetName() throws Exception {
+ PropertyScope testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getName();
+ }
+
+ @Test
+ public void testSetName() throws Exception {
+ PropertyScope testSubject;
+ String name = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setName(name);
+ }
+
+ @Test
+ public void testHashCode() throws Exception {
+ PropertyScope testSubject;
+ int result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.hashCode();
+ }
+
+ @Test
+ public void testEquals() throws Exception {
+ PropertyScope testSubject;
+ Object obj = null;
+ boolean result;
+
+ // test 1
+ testSubject = createTestSubject();
+ result = testSubject.equals(obj);
+ Assert.assertEquals(false, result);
+ obj = new Object();
+ result = testSubject.equals(obj);
+ Assert.assertEquals(false, result);
+ result = testSubject.equals(testSubject);
+ Assert.assertEquals(true, result);
+ result = testSubject.equals(createTestSubject());
+ Assert.assertEquals(false, result);
+ testSubject.setName("mock");
+ PropertyScope createTestSubject2 = createTestSubject();
+ result = testSubject.equals(createTestSubject2);
+ Assert.assertEquals(false, result);
+ createTestSubject2.setName("mock");
+ result = testSubject.equals(createTestSubject2);
+ Assert.assertEquals(true, result);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/RelationshipInfoTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/RelationshipInfoTest.java
new file mode 100644
index 0000000000..1a606f5bb7
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/RelationshipInfoTest.java
@@ -0,0 +1,232 @@
+package org.openecomp.sdc.be.model;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.elements.RelationshipInstDataDefinition;
+
+public class RelationshipInfoTest {
+
+ private RelationshipInfo createTestSubject() {
+ return new RelationshipInfo();
+ }
+
+ @Test
+ public void testCtor() throws Exception {
+ new RelationshipInfo("mock", new RelationshipImpl());
+ new RelationshipInfo("mock", new RelationshipImpl(), "mock");
+ }
+
+ @Test
+ public void testGetRequirement() throws Exception {
+ RelationshipInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRequirement();
+ }
+
+ @Test
+ public void testSetRequirement() throws Exception {
+ RelationshipInfo testSubject;
+ String requirement = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRequirement(requirement);
+ }
+
+ @Test
+ public void testGetCapabilityOwnerId() throws Exception {
+ RelationshipInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getCapabilityOwnerId();
+ }
+
+ @Test
+ public void testSetCapabilityOwnerId() throws Exception {
+ RelationshipInfo testSubject;
+ String capabilityOwnerId = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCapabilityOwnerId(capabilityOwnerId);
+ }
+
+ @Test
+ public void testGetRequirementOwnerId() throws Exception {
+ RelationshipInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRequirementOwnerId();
+ }
+
+ @Test
+ public void testSetRequirementOwnerId() throws Exception {
+ RelationshipInfo testSubject;
+ String requirementOwnerId = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRequirementOwnerId(requirementOwnerId);
+ }
+
+ @Test
+ public void testGetRelationship() throws Exception {
+ RelationshipInfo testSubject;
+ RelationshipImpl result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRelationship();
+ }
+
+ @Test
+ public void testSetRelationships() throws Exception {
+ RelationshipInfo testSubject;
+ RelationshipImpl relationship = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRelationships(relationship);
+ }
+
+ @Test
+ public void testGetCapability() throws Exception {
+ RelationshipInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getCapability();
+ }
+
+ @Test
+ public void testSetCapability() throws Exception {
+ RelationshipInfo testSubject;
+ String capability = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCapability(capability);
+ }
+
+ @Test
+ public void testGetCapabilityUid() throws Exception {
+ RelationshipInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getCapabilityUid();
+ }
+
+ @Test
+ public void testSetCapabilityUid() throws Exception {
+ RelationshipInfo testSubject;
+ String capabilityUid = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCapabilityUid(capabilityUid);
+ }
+
+ @Test
+ public void testGetRequirementUid() throws Exception {
+ RelationshipInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRequirementUid();
+ }
+
+ @Test
+ public void testSetRequirementUid() throws Exception {
+ RelationshipInfo testSubject;
+ String requirementUid = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRequirementUid(requirementUid);
+ }
+
+ @Test
+ public void testGetId() throws Exception {
+ RelationshipInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getId();
+ }
+
+ @Test
+ public void testSetId() throws Exception {
+ RelationshipInfo testSubject;
+ String id = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setId(id);
+ }
+
+ @Test
+ public void testToString() throws Exception {
+ RelationshipInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.toString();
+ }
+
+ @Test
+ public void testEqualsTo() throws Exception {
+ RelationshipInfo testSubject;
+ RelationshipInstDataDefinition savedRelation = null;
+ boolean result;
+
+ // test 1
+ testSubject = createTestSubject();
+ result = testSubject.equalsTo(savedRelation);
+ Assert.assertEquals(false, result);
+ savedRelation = new RelationshipInstDataDefinition();
+ RelationshipImpl relationship = new RelationshipImpl();
+ savedRelation.setType("mock");
+ testSubject.setRelationships(relationship);
+ result = testSubject.equalsTo(savedRelation);
+ Assert.assertEquals(false, result);
+ relationship.setType("mock");
+ savedRelation.setCapabilityOwnerId("mock");
+ result = testSubject.equalsTo(savedRelation);
+ Assert.assertEquals(false, result);
+ testSubject.setCapabilityOwnerId("mock");
+ savedRelation.setRequirementOwnerId("mock");
+ result = testSubject.equalsTo(savedRelation);
+ Assert.assertEquals(false, result);
+ savedRelation.setRequirementOwnerId("mock");
+ result = testSubject.equalsTo(savedRelation);
+ Assert.assertEquals(false, result);
+ testSubject.setRequirementOwnerId("mock");
+ savedRelation.setRequirementId("mock");
+ result = testSubject.equalsTo(savedRelation);
+ Assert.assertEquals(false, result);
+ testSubject.setRequirementUid("mock");
+ savedRelation.setCapabilityId("mock");
+ result = testSubject.equalsTo(savedRelation);
+ Assert.assertEquals(false, result);
+ testSubject.setCapabilityUid("mock");
+ savedRelation.setRequirement("mock");
+ result = testSubject.equalsTo(savedRelation);
+ Assert.assertEquals(false, result);
+ testSubject.setRequirement("mock");
+ result = testSubject.equalsTo(savedRelation);
+ Assert.assertEquals(true, result);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceInstanceHeatParameterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceInstanceHeatParameterTest.java
index 95b314604a..d1882cc372 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceInstanceHeatParameterTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceInstanceHeatParameterTest.java
@@ -9,6 +9,10 @@ public class ResourceInstanceHeatParameterTest {
return new ResourceInstanceHeatParameter();
}
+ @Test
+ public void testCtor() throws Exception {
+ new ResourceInstanceHeatParameter(new HeatParameterDefinition(), "mock");
+ }
@Test
public void testGetValueUniqueId() throws Exception {
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java
index c2623ebda5..e9976834b8 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java
@@ -7,13 +7,19 @@ import org.junit.Assert;
import org.junit.Test;
import org.openecomp.sdc.be.datatypes.elements.InterfaceOperationDataDefinition;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
+import org.openecomp.sdc.be.unittests.utils.ModelConfDependentTest;
-public class ResourceTest {
+public class ResourceTest extends ModelConfDependentTest{
private Resource createTestSubject() {
return new Resource();
}
+ @Test
+ public void testCtor() throws Exception {
+ ComponentMetadataDefinition componentMetadataDefinition = new ComponentMetadataDefinition();
+ new Resource(componentMetadataDefinition);
+ }
@Test
public void testGetDerivedFrom() throws Exception {
@@ -254,9 +260,17 @@ public class ResourceTest {
// test 1
testSubject = createTestSubject();
- obj = null;
result = testSubject.equals(obj);
Assert.assertEquals(false, result);
+ obj = new Object();
+ result = testSubject.equals(obj);
+ Assert.assertEquals(false, result);
+ result = testSubject.equals(testSubject);
+ Assert.assertEquals(true, result);
+
+ Resource testSubject2 = createTestSubject();
+ result = testSubject.equals(testSubject2);
+ Assert.assertEquals(true, result);
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ServiceTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ServiceTest.java
index 3d0c8a1d28..7dafe7d1dc 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ServiceTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ServiceTest.java
@@ -12,6 +12,11 @@ public class ServiceTest {
}
@Test
+ public void testCtor() throws Exception {
+ new Service(new ComponentMetadataDefinition());
+ }
+
+ @Test
public void testGetServiceApiArtifacts() throws Exception {
Service testSubject;
Map<String, ArtifactDefinition> result;
@@ -109,6 +114,7 @@ public class ServiceTest {
testSubject = createTestSubject();
distributionStatus = null;
testSubject.setDistributionStatus(distributionStatus);
+ testSubject.setDistributionStatus(DistributionStatusEnum.DISTRIBUTED);
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/TagTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/TagTest.java
new file mode 100644
index 0000000000..ac4475e8ae
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/TagTest.java
@@ -0,0 +1,68 @@
+package org.openecomp.sdc.be.model;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TagTest {
+
+ private Tag createTestSubject() {
+ return new Tag();
+ }
+
+ @Test
+ public void testGetName() throws Exception {
+ Tag testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getName();
+ }
+
+ @Test
+ public void testSetName() throws Exception {
+ Tag testSubject;
+ String name = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setName(name);
+ }
+
+ @Test
+ public void testHashCode() throws Exception {
+ Tag testSubject;
+ int result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.hashCode();
+ }
+
+ @Test
+ public void testEquals() throws Exception {
+ Tag testSubject;
+ Object obj = null;
+ boolean result;
+
+ // test 1
+ testSubject = createTestSubject();
+ result = testSubject.equals(obj);
+ Assert.assertEquals(false, result);
+ obj = new Object();
+ result = testSubject.equals(obj);
+ Assert.assertEquals(false, result);
+ result = testSubject.equals(testSubject);
+ Assert.assertEquals(true, result);
+
+ Tag createTestSubject = createTestSubject();
+ result = testSubject.equals(createTestSubject);
+ Assert.assertEquals(false, result);
+ testSubject.setName("mock");
+ result = testSubject.equals(createTestSubject);
+ Assert.assertEquals(false, result);
+ createTestSubject.setName("mock");
+ result = testSubject.equals(createTestSubject);
+ Assert.assertEquals(true, result);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/TargetCapabilityRelDefTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/TargetCapabilityRelDefTest.java
new file mode 100644
index 0000000000..ab610116f1
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/TargetCapabilityRelDefTest.java
@@ -0,0 +1,98 @@
+package org.openecomp.sdc.be.model;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.junit.Test;
+
+public class TargetCapabilityRelDefTest {
+
+ private TargetCapabilityRelDef createTestSubject() {
+ return new TargetCapabilityRelDef();
+ }
+
+ @Test
+ public void testCtor() throws Exception {
+ new TargetCapabilityRelDef("mock", new LinkedList<>());
+ }
+
+ @Test
+ public void testGetToNode() throws Exception {
+ TargetCapabilityRelDef testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getToNode();
+ }
+
+ @Test
+ public void testSetToNode() throws Exception {
+ TargetCapabilityRelDef testSubject;
+ String toNode = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setToNode(toNode);
+ }
+
+ @Test
+ public void testGetRelationships() throws Exception {
+ TargetCapabilityRelDef testSubject;
+ List<CapabilityRequirementRelationship> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRelationships();
+ }
+
+ @Test
+ public void testResolveSingleRelationship() throws Exception {
+ TargetCapabilityRelDef testSubject;
+ CapabilityRequirementRelationship result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.resolveSingleRelationship();
+ }
+
+ @Test
+ public void testGetUid() throws Exception {
+ TargetCapabilityRelDef testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getUid();
+ }
+
+ @Test
+ public void testSetUid() throws Exception {
+ TargetCapabilityRelDef testSubject;
+ String uid = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setUid(uid);
+ }
+
+ @Test
+ public void testSetRelationships() throws Exception {
+ TargetCapabilityRelDef testSubject;
+ List<CapabilityRequirementRelationship> relationships = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRelationships(relationships);
+ }
+
+ @Test
+ public void testToString() throws Exception {
+ TargetCapabilityRelDef testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.toString();
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/UploadComponentInstanceInfoTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/UploadComponentInstanceInfoTest.java
new file mode 100644
index 0000000000..f23e04bfec
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/UploadComponentInstanceInfoTest.java
@@ -0,0 +1,153 @@
+package org.openecomp.sdc.be.model;
+
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+
+public class UploadComponentInstanceInfoTest {
+
+ private UploadComponentInstanceInfo createTestSubject() {
+ return new UploadComponentInstanceInfo();
+ }
+
+ @Test
+ public void testGetProperties() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, List<UploadPropInfo>> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getProperties();
+ }
+
+ @Test
+ public void testSetProperties() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, List<UploadPropInfo>> properties = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setProperties(properties);
+ }
+
+ @Test
+ public void testGetName() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getName();
+ }
+
+ @Test
+ public void testSetName() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ String name = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setName(name);
+ }
+
+ @Test
+ public void testGetType() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getType();
+ }
+
+ @Test
+ public void testSetType() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ String type = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setType(type);
+ }
+
+ @Test
+ public void testGetCapabilities() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, List<UploadCapInfo>> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getCapabilities();
+ }
+
+ @Test
+ public void testSetCapabilities() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, List<UploadCapInfo>> capabilities = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCapabilities(capabilities);
+ }
+
+ @Test
+ public void testGetRequirements() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, List<UploadReqInfo>> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRequirements();
+ }
+
+ @Test
+ public void testSetRequirements() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, List<UploadReqInfo>> requirements = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRequirements(requirements);
+ }
+
+ @Test
+ public void testGetCapabilitiesNamesToUpdate() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getCapabilitiesNamesToUpdate();
+ }
+
+ @Test
+ public void testSetCapabilitiesNamesToUpdate() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, String> capabilitiesNamesToUpdate = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCapabilitiesNamesToUpdate(capabilitiesNamesToUpdate);
+ }
+
+ @Test
+ public void testGetRequirementsNamesToUpdate() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getRequirementsNamesToUpdate();
+ }
+
+ @Test
+ public void testSetRequirementsNamesToUpdate() throws Exception {
+ UploadComponentInstanceInfo testSubject;
+ Map<String, String> requirementsNamesToUpdate = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setRequirementsNamesToUpdate(requirementsNamesToUpdate);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/IdMapperTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/IdMapperTest.java
index 3429f1ea49..39ea68c3fe 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/IdMapperTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/IdMapperTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.be.model.jsontitan.utils;
-import javax.annotation.Generated;
-
import org.junit.Test;
import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/InterfaceUtilsTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/InterfaceUtilsTest.java
index 64c4cd792b..9a7ccc7f26 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/InterfaceUtilsTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/utils/InterfaceUtilsTest.java
@@ -6,8 +6,6 @@ import java.util.Map;
import java.util.Optional;
import org.junit.Test;
-import org.openecomp.sdc.be.datatypes.elements.OperationInputDefinition;
-import org.openecomp.sdc.be.model.InputDefinition;
import org.openecomp.sdc.be.model.InterfaceDefinition;
import org.openecomp.sdc.be.model.Operation;
import org.openecomp.sdc.be.model.Resource;
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ComponentInstanceOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ComponentInstanceOperationTest.java
index bfefd00994..40f692ca41 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ComponentInstanceOperationTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ComponentInstanceOperationTest.java
@@ -1,19 +1,9 @@
package org.openecomp.sdc.be.model.operations.impl;
-import static org.junit.Assert.*;
-import java.util.*;
-import org.junit.Assert;
import org.junit.Test;
-import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
import org.openecomp.sdc.be.dao.titan.TitanGenericDao;
-import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
-import org.openecomp.sdc.be.model.ComponentInstance;
import org.openecomp.sdc.be.model.ComponentInstanceInput;
-import org.openecomp.sdc.be.model.ComponentInstanceProperty;
import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
-import org.openecomp.sdc.be.resources.data.AttributeData;
-import org.openecomp.sdc.be.resources.data.AttributeValueData;
-import org.openecomp.sdc.be.resources.data.ComponentInstanceData;
import fj.data.Either;
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtilTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtilTest.java
index 877c7c40eb..c6df4f726e 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtilTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtilTest.java
@@ -1,10 +1,7 @@
package org.openecomp.sdc.be.model.tosca.constraints;
-import javax.annotation.Generated;
-
import org.junit.Test;
import org.openecomp.sdc.be.model.tosca.ToscaType;
-import org.openecomp.sdc.be.model.tosca.constraints.ConstraintUtil.ConstraintInformation;
public class ConstraintUtilTest {
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 500ecfc497..d5425504e6 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,18 +1,19 @@
package org.openecomp.sdc.be.model.tosca.converters;
-import com.google.gson.JsonObject;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.sdc.be.model.DataTypeDefinition;
-import org.openecomp.sdc.be.model.PropertyDefinition;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+import org.openecomp.sdc.be.model.PropertyDefinition;
+
+import com.google.gson.JsonObject;
public class DataTypePropertyConverterTest {
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/LowerCaseConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/LowerCaseConverterTest.java
index d86f7f43f7..fe37d3e8c7 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/LowerCaseConverterTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/LowerCaseConverterTest.java
@@ -2,9 +2,6 @@ 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;
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
index 7e9388ee1b..00ac26312d 100644
--- 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
@@ -1,13 +1,13 @@
package org.openecomp.sdc.be.model.tosca.converters;
-import org.junit.Test;
-
-import java.util.Collections;
-
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.junit.Assert.assertNull;
+import java.util.Collections;
+
+import org.junit.Test;
+
public class ToscaFloatConverterTest {
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverterTest.java
index 02d8ed6632..9819e3f6e8 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverterTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/ToscaMapValueConverterTest.java
@@ -1,12 +1,6 @@
package org.openecomp.sdc.be.model.tosca.converters;
-import static org.junit.Assert.*;
-import java.util.*;
-import org.junit.Assert;
import org.junit.Test;
-import org.openecomp.sdc.be.model.DataTypeDefinition;
-
-import com.google.gson.JsonElement;
public class ToscaMapValueConverterTest {
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/MapValidatorTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/MapValidatorTest.java
index 6f33b19de3..c82894fe5e 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/MapValidatorTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/MapValidatorTest.java
@@ -1,10 +1,10 @@
package org.openecomp.sdc.be.model.tosca.validators;
-import org.junit.Test;
+import static org.junit.Assert.assertFalse;
import java.util.Collections;
-import static org.junit.Assert.*;
+import org.junit.Test;
public class MapValidatorTest {
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/ToscaBooleanValidatorTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/ToscaBooleanValidatorTest.java
index c1a99e754a..3070c3df4e 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/ToscaBooleanValidatorTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/validators/ToscaBooleanValidatorTest.java
@@ -2,9 +2,6 @@ package org.openecomp.sdc.be.model.tosca.validators;
import java.util.Map;
-import javax.annotation.Generated;
-
-import org.junit.Assert;
import org.junit.Test;
import org.openecomp.sdc.be.model.DataTypeDefinition;
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/unittests/utils/FactoryUtilsTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/unittests/utils/FactoryUtilsTest.java
index 380111dc77..53ed77638c 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/unittests/utils/FactoryUtilsTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/unittests/utils/FactoryUtilsTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.be.unittests.utils;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
import org.openecomp.sdc.be.dao.graph.datatype.GraphEdge;
import org.openecomp.sdc.be.model.CapabilityDefinition;
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/unittests/utils/ModelConfDependentTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/unittests/utils/ModelConfDependentTest.java
new file mode 100644
index 0000000000..2135b668e6
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/unittests/utils/ModelConfDependentTest.java
@@ -0,0 +1,13 @@
+package org.openecomp.sdc.be.unittests.utils;
+
+import org.junit.BeforeClass;
+import org.openecomp.sdc.common.test.BaseConfDependent;
+
+public class ModelConfDependentTest extends BaseConfDependent {
+ @BeforeClass
+ public static void setupBeforeClass() {
+ componentName = "catalog-model";
+ confPath = "src/test/resources/config";
+ setUp();
+ }
+}