aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyDefinitionTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyDefinitionTest.java')
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyDefinitionTest.java55
1 files changed, 54 insertions, 1 deletions
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyDefinitionTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyDefinitionTest.java
index 639be3a5d7..5a8888b8b0 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyDefinitionTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/PropertyDefinitionTest.java
@@ -1,8 +1,11 @@
package org.openecomp.sdc.be.model;
+import java.util.LinkedList;
import java.util.List;
import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
+import org.openecomp.sdc.be.model.PropertyDefinition.PropertyNames;
public class PropertyDefinitionTest {
@@ -10,7 +13,44 @@ public class PropertyDefinitionTest {
private PropertyDefinition createTestSubject() {
return new PropertyDefinition();
}
-
+
+ @Test
+ public void testCtor() throws Exception {
+ new PropertyDefinition(new PropertyDefinition());
+ new PropertyDefinition(new PropertyDataDefinition());
+ }
+
+ @Test
+ public void testPropertyNames() throws Exception {
+ PropertyNames availabiltyZoneCount = PropertyDefinition.PropertyNames.AVAILABILTY_ZONE_COUNT;
+ }
+
+ @Test
+ public void testPropertyNames_GetPropertyName() throws Exception {
+ PropertyDefinition.PropertyNames.AVAILABILTY_ZONE_COUNT.getPropertyName();
+ }
+
+ @Test
+ public void testPropertyNames_GetUpdateBehavior() throws Exception {
+ PropertyDefinition.PropertyNames.AVAILABILTY_ZONE_COUNT.getUpdateBehavior();
+ }
+
+ @Test
+ public void testPropertyNames_FindName() throws Exception {
+ PropertyDefinition.PropertyNames.findName(null);
+ PropertyDefinition.PropertyNames.findName(PropertyDefinition.PropertyNames.AVAILABILTY_ZONE_COUNT.getPropertyName());
+ }
+
+ @Test
+ public void testGroupInstancePropertyValueUpdateBehavior_GetLevelName() throws Exception {
+ PropertyDefinition.GroupInstancePropertyValueUpdateBehavior.NOT_RELEVANT.getLevelName();
+ }
+
+ @Test
+ public void testGroupInstancePropertyValueUpdateBehavior_GetLevelNumber() throws Exception {
+ PropertyDefinition.GroupInstancePropertyValueUpdateBehavior.NOT_RELEVANT.getLevelNumber();
+ }
+
@Test
public void testGetConstraints() throws Exception {
PropertyDefinition testSubject;
@@ -80,5 +120,18 @@ public class PropertyDefinitionTest {
// default test
testSubject = createTestSubject();
result = testSubject.equals(obj);
+
+ result = testSubject.equals(new Object());
+ result = testSubject.equals(testSubject);
+ PropertyDefinition testSubject2 = createTestSubject();
+ result = testSubject.equals(testSubject2);
+ testSubject2.setConstraints(new LinkedList<>());
+ result = testSubject.equals(testSubject2);
+ testSubject.setConstraints(new LinkedList<>());
+ result = testSubject.equals(testSubject2);
+ testSubject2.setName("mock");
+ result = testSubject.equals(testSubject2);
+ testSubject.setName("mock");
+ result = testSubject.equals(testSubject2);
}
} \ No newline at end of file