aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl
diff options
context:
space:
mode:
authormojahidi <mojahidul.islam@amdocs.com>2017-11-15 15:13:59 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-11-19 12:01:35 +0000
commit581e9aa490b015d9b46314663c165a8bf12523d8 (patch)
treeeaaacd22bd59163220a0e19563940a13efcc2661 /openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl
parentb91470aaf45ccd77c56a7882f0babc9b4a2b9637 (diff)
Adding common changes for all HEAT Validators
This commit is about adding common changes which will later be used for all validators. Change-Id: I47cee23364c2f535482c721c25cb0038e9febc02 Issue-ID:SDC-572 Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl')
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java
index 345aad330d..64b3d2bb3c 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ErrorMessagesTest.java
@@ -24,6 +24,7 @@ import org.junit.Test;
import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
import org.openecomp.sdc.common.errors.Messages;
import org.testng.Assert;
+import org.openecomp.core.validation.ErrorMessageCode;
public class ErrorMessagesTest {
@@ -43,4 +44,11 @@ public class ErrorMessagesTest {
"res");
Assert.assertNotNull(error1);
}
+ @Test
+ public void testErrorFormatWithErrorCode() {
+ String error = ErrorMessagesFormatBuilder
+ .getErrorWithParameters(new ErrorMessageCode("TestCode"), Messages.MISSING_NOVA_SERVER_METADATA
+ .getErrorMessage(), "param");
+ Assert.assertEquals("[TestCode]: Missing Nova Server Metadata property, Resource ID [param]", error);
+ }
}