aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java
index 87875d8f20..9cd095b5b5 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ImportUtilsTest.java
@@ -324,7 +324,7 @@ public class ImportUtilsTest {
PropertyDefinition property = properties.get("service_type");
assertTrue(property.getConstraints()!= null && property.getConstraints().size() == 1);
assertTrue(property.getConstraints().get(0) instanceof ValidValuesConstraint);
- assertTrue(((ValidValuesConstraint) property.getConstraints().get(0)).getValidValues() != null);
+ assertNotNull(((ValidValuesConstraint) property.getConstraints().get(0)).getValidValues());
List<String> validValues = ((ValidValuesConstraint) property.getConstraints().get(0)).getValidValues();
assertTrue(validValues.containsAll(Lists.newArrayList("firewall", "analyzer", "source-nat", "loadbalancer")));
@@ -334,7 +334,7 @@ public class ImportUtilsTest {
PropertyDefinition innerProperty = new PropertyDefinition(property.getSchema().getProperty());
List<PropertyConstraint> innerConstraints = innerProperty.getConstraints();
assertTrue(innerConstraints.get(0) instanceof ValidValuesConstraint);
- assertTrue(((ValidValuesConstraint) innerConstraints.get(0)).getValidValues() != null);
+ assertNotNull(((ValidValuesConstraint) innerConstraints.get(0)).getValidValues());
validValues = ((ValidValuesConstraint) innerConstraints.get(0)).getValidValues();
assertTrue(validValues.containsAll(Lists.newArrayList("management", "left", "right", "other")));
}
@@ -352,6 +352,10 @@ public class ImportUtilsTest {
Map<String, Map<String, Object>> expectedProperties = getElements(toscaJson, TypeUtils.ToscaTagNamesEnum.INPUTS);
compareProperties(expectedProperties, actualInputs.left().value());
+ actualInputs = ImportUtils.getInputs(toscaJson);
+ assertTrue(actualInputs.isLeft());
+ expectedProperties = getElements(toscaJson, TypeUtils.ToscaTagNamesEnum.INPUTS);
+ compareProperties(expectedProperties, actualInputs.left().value());
}
private void compareAttributes(Map<String, Map<String, Object>> expected, Map<String, AttributeDataDefinition> actual) {