summaryrefslogtreecommitdiffstats
path: root/common-be/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'common-be/src/test/java')
-rw-r--r--common-be/src/test/java/org/openecomp/sdc/be/utils/PropertyFilterConstraintDataDefinitionHelperTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/common-be/src/test/java/org/openecomp/sdc/be/utils/PropertyFilterConstraintDataDefinitionHelperTest.java b/common-be/src/test/java/org/openecomp/sdc/be/utils/PropertyFilterConstraintDataDefinitionHelperTest.java
index 86548fa1d5..5684db2332 100644
--- a/common-be/src/test/java/org/openecomp/sdc/be/utils/PropertyFilterConstraintDataDefinitionHelperTest.java
+++ b/common-be/src/test/java/org/openecomp/sdc/be/utils/PropertyFilterConstraintDataDefinitionHelperTest.java
@@ -77,6 +77,17 @@ class PropertyFilterConstraintDataDefinitionHelperTest {
}
@Test
+ void convertLegacyConstraintGetInputFromSelfTest() throws IOException {
+ final PropertyFilterConstraintDataDefinition propertyFilterConstraint =
+ PropertyFilterConstraintDataDefinitionHelper.convertLegacyConstraint(readConstraintFile("legacy-get_input-from-self.yaml"));
+ assertPropertyFilterConstraint(propertyFilterConstraint, "flavour_id", null, ConstraintType.EQUAL, FilterValueType.GET_INPUT);
+ assertTrue(propertyFilterConstraint.getValue() instanceof ToscaGetFunctionDataDefinition);
+ final var toscaGetFunction = (ToscaGetFunctionDataDefinition) propertyFilterConstraint.getValue();
+ assertToscaGetFunction(toscaGetFunction, ToscaFunctionType.GET_INPUT, ToscaGetFunctionType.GET_INPUT, PropertySource.SELF,
+ List.of("SELF", "input", "subInput"), "subInput", null);
+ }
+
+ @Test
void convertLegacyConstraintGetAttributeFromInstanceTest() throws IOException {
final PropertyFilterConstraintDataDefinition propertyFilterConstraint =
PropertyFilterConstraintDataDefinitionHelper.convertLegacyConstraint(readConstraintFile("legacy-get_attribute-from-instance.yaml"));