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
bbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */