summaryrefslogtreecommitdiffstats
path: root/models-tosca/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-12-18 19:01:52 -0500
committerJim Hahn <jrh3@att.com>2020-12-21 10:38:00 -0500
commit12fce55a66848bcc7f71430324b3a9051b8ce0d4 (patch)
treef8fdcb848f5b3bcfc07cc44f728bc51da620c6b3 /models-tosca/src/test
parent6345dce40405740dc09176c45dae03baeb939b8e (diff)
Use annotations to do validation
Modified models to use annotations instead of function calls for most field validations. Created a few new validation annotations for use within models. Per review comments: - renamed Key to VerifyKey - enhanced VerifyKey to imply "@Valid", unless disabled Issue-ID: POLICY-2648 Change-Id: I2b53f218b0a2ab1ed1f5e278816a3509f1408972 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-tosca/src/test')
-rw-r--r--models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplateTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplateTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplateTest.java
index d6266b49a..8f366b321 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplateTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplateTest.java
@@ -141,7 +141,7 @@ public class JpaToscaServiceTemplateTest {
tst.setToscaDefinitionsVersion(null);
BeanValidationResult result = tst.validate("");
- assertThat(result.getResult()).contains("toscaDefinitionsVersion").contains(Validated.IS_BLANK);
+ assertThat(result.getResult()).contains("toscaDefinitionsVersion").contains(Validated.IS_NULL);
tst.setToscaDefinitionsVersion(JpaToscaServiceTemplate.DEFAULT_TOSCA_DEFINTIONS_VERISON);
tst.setDataTypes(null);