diff options
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.java | 8 |
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); + } } |