aboutsummaryrefslogtreecommitdiffstats
path: root/common-be/src/test/java
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2022-07-25 10:41:31 +0100
committerMichael Morris <michael.morris@est.tech>2022-07-29 20:09:49 +0000
commit7be04e3e3bdc899c52ffea1f6e11731771903f93 (patch)
treef18c4579d22587a8efd904b62d8d1878b2de8a2b /common-be/src/test/java
parent3f9669fdae5f7c6cb1bfe34742df35dfe3a14aa7 (diff)
Centralize TOSCA function validation
The validation happening in the component instance properties, should also be applied for the Group instance properties and Policy instance properties. Fixes some other problems related to the TOSCA function. Change-Id: I4b69da57a8444b78c72561f49146d32c6911482e Issue-ID: SDC-4114 Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'common-be/src/test/java')
-rw-r--r--common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinitionTest.java18
1 files changed, 2 insertions, 16 deletions
diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinitionTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinitionTest.java
index 2d73faf41e..f83eb9d069 100644
--- a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinitionTest.java
+++ b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinitionTest.java
@@ -694,16 +694,6 @@ class PropertyDataDefinitionTest {
toscaGetFunction.setFunctionType(ToscaGetFunctionType.GET_ATTRIBUTE);
assertEquals(ToscaGetFunctionType.GET_ATTRIBUTE, propertyDataDefinition.getToscaGetFunctionType());
-
- propertyDataDefinition = new PropertyDataDefinition();
- propertyDataDefinition.setToscaGetFunctionType(ToscaGetFunctionType.GET_INPUT);
- assertEquals(ToscaGetFunctionType.GET_INPUT, propertyDataDefinition.getToscaGetFunctionType());
-
- propertyDataDefinition.setToscaGetFunctionType(ToscaGetFunctionType.GET_PROPERTY);
- assertEquals(ToscaGetFunctionType.GET_PROPERTY, propertyDataDefinition.getToscaGetFunctionType());
-
- propertyDataDefinition.setToscaGetFunctionType(ToscaGetFunctionType.GET_ATTRIBUTE);
- assertEquals(ToscaGetFunctionType.GET_ATTRIBUTE, propertyDataDefinition.getToscaGetFunctionType());
}
@Test
@@ -721,12 +711,8 @@ class PropertyDataDefinitionTest {
@Test
void isToscaGetFunctionTest() {
- var propertyDataDefinition = new PropertyDataDefinition();
- propertyDataDefinition.setToscaGetFunctionType(ToscaGetFunctionType.GET_PROPERTY);
- assertTrue(propertyDataDefinition.isToscaGetFunction());
-
- propertyDataDefinition = new PropertyDataDefinition();
- final ToscaGetFunctionDataDefinition toscaGetFunction = new ToscaGetFunctionDataDefinition();
+ final var propertyDataDefinition = new PropertyDataDefinition();
+ final var toscaGetFunction = new ToscaGetFunctionDataDefinition();
toscaGetFunction.setFunctionType(ToscaGetFunctionType.GET_INPUT);
propertyDataDefinition.setToscaFunction(toscaGetFunction);
assertTrue(propertyDataDefinition.isToscaGetFunction());