diff options
author | 2019-09-26 13:20:28 +0100 | |
---|---|---|
committer | 2019-10-29 14:15:57 +0000 | |
commit | c42c9f75adb72f80e57694b5bf67db7c94f33a89 (patch) | |
tree | f5e16e64400af3f795061dceb02fee8522ed4245 /common/onap-tosca-datatype/src/test/java/org | |
parent | 145e960db3614cf499aa0be0dbb4f19b3ba3183e (diff) |
Fix for status properties value.
These changes were made to align the normative types to the TOSCA property definition requirements.
Issue-ID: SDC-322
Change-Id: I32e815dd26990dd6c82c859ad051b271db3c8029
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Diffstat (limited to 'common/onap-tosca-datatype/src/test/java/org')
3 files changed, 7 insertions, 7 deletions
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/AttributeDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/AttributeDefinitionTest.java index 237832971f..deab74f567 100644 --- a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/AttributeDefinitionTest.java +++ b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/AttributeDefinitionTest.java @@ -40,7 +40,7 @@ public class AttributeDefinitionTest { attributeDefinition.setType("type"); attributeDefinition.setDescription("description"); attributeDefinition.set_default("default"); - attributeDefinition.setStatus(Status.SUPPORTED); + attributeDefinition.setStatus(Status.SUPPORTED.getName()); attributeDefinition.setEntry_schema(new EntrySchema()); AttributeDefinition cloned = attributeDefinition.clone(); diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PropertyDefinitionTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PropertyDefinitionTest.java index d9f1cc9a85..d81645129e 100644 --- a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PropertyDefinitionTest.java +++ b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/datatypes/model/PropertyDefinitionTest.java @@ -25,7 +25,7 @@ public class PropertyDefinitionTest { public void cloneTest() { PropertyDefinition propertyDefinition = new PropertyDefinition(); propertyDefinition.setRequired(false); - propertyDefinition.setStatus(Status.DEPRECATED); + propertyDefinition.setStatus(Status.DEPRECATED.getName()); Constraint constraint = new Constraint(); constraint.setEqual("123"); ArrayList<Constraint> constraints = new ArrayList<>(); @@ -34,8 +34,8 @@ public class PropertyDefinitionTest { PropertyDefinition propertyDefinitionClone = propertyDefinition.clone(); Assert.assertEquals(propertyDefinition.getRequired(), propertyDefinitionClone.getRequired()); - Assert.assertEquals(propertyDefinition.getStatus().getDisplayName(), - propertyDefinitionClone.getStatus().getDisplayName()); + Assert.assertEquals(propertyDefinition.getStatus(), + propertyDefinitionClone.getStatus()); Assert.assertEquals(propertyDefinition.getConstraints().get(0).getEqual(), propertyDefinitionClone.getConstraints().get(0).getEqual()); } diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/DataModelCloneUtilTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/DataModelCloneUtilTest.java index ee6d858c82..d24d32c8d5 100644 --- a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/DataModelCloneUtilTest.java +++ b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/DataModelCloneUtilTest.java @@ -161,8 +161,8 @@ public class DataModelCloneUtilTest { Assert.assertEquals(originalMap.get(KEY1).getDescription(), cloneMap.get(KEY1).getDescription()); Assert.assertEquals(originalMap.get(KEY2).getDescription(), cloneMap.get(KEY2).getDescription()); Assert.assertEquals(originalMap.get(KEY1).getImplementation(), cloneMap.get(KEY1).getImplementation()); - Assert.assertEquals(originalMap.get(KEY2).getInputs().get(INPUT_KEY1).getStatus().getDisplayName(), - cloneMap.get(DataModelCloneUtilTest.KEY2).getInputs().get(INPUT_KEY1).getStatus().getDisplayName()); + Assert.assertEquals(originalMap.get(KEY2).getInputs().get(INPUT_KEY1).getStatus(), + cloneMap.get(DataModelCloneUtilTest.KEY2).getInputs().get(INPUT_KEY1).getStatus()); Assert.assertEquals(originalMap.get(KEY2).getInputs().get(INPUT_KEY1).getConstraints().get(0).getEqual(), cloneMap.get(KEY2).getInputs().get(INPUT_KEY1).getConstraints().get(0).getEqual()); } @@ -170,7 +170,7 @@ public class DataModelCloneUtilTest { private PropertyDefinition createPropertyDefinition() { PropertyDefinition propertyDefinition = new PropertyDefinition(); propertyDefinition.setRequired(false); - propertyDefinition.setStatus(Status.UNSUPPORTED); + propertyDefinition.setStatus(Status.UNSUPPORTED.getName()); Constraint constraint = new Constraint(); constraint.setEqual("1234"); ArrayList<Constraint> constraints = new ArrayList<>(); |