summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/test/java/org/onap
diff options
context:
space:
mode:
Diffstat (limited to 'csarvalidation/src/test/java/org/onap')
-rw-r--r--csarvalidation/src/test/java/org/onap/cvc/csar/CSARArchiveTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/CSARArchiveTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/CSARArchiveTest.java
index bd9b191..2831532 100644
--- a/csarvalidation/src/test/java/org/onap/cvc/csar/CSARArchiveTest.java
+++ b/csarvalidation/src/test/java/org/onap/cvc/csar/CSARArchiveTest.java
@@ -21,6 +21,7 @@ import java.util.Arrays;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
public class CSARArchiveTest {
@Test
@@ -42,4 +43,14 @@ public class CSARArchiveTest {
}
}
+ @Test
+ public void testErrorToStringForGson(){
+
+ String expected = "{\"code\":\"0x1001\",\"message\":\"Invalid value. Entry [testEntry]. Valid values are [-1]. InvalidEntry\",\"file\":\"abc\",\"lineNumber\":-1}";
+ CSARArchive.CSARErrorInvalidEntryValue testError =
+ new CSARArchive.CSARErrorInvalidEntryValue("testEntry","abc","InvalidEntry","-1");
+ assertEquals(expected,testError.toString());
+
+ }
+
}