diff options
author | 2020-03-13 10:52:03 +0000 | |
---|---|---|
committer | 2020-03-13 10:52:03 +0000 | |
commit | 471d10938b8886d695bd9c50b88ad210a61b5a8c (patch) | |
tree | ee44ea20e32928f26fa4e1a071f3e36254f82f22 /csarvalidation/src/test/java/org/onap | |
parent | 222fe26ea3926a08f3797ebc50cb958fe756683f (diff) |
Migrate to gson
Issue-ID: VNFSDK-553
Signed-off-by: priyanka.akhade <priyanka.akhade@huawei.com>
Change-Id: Ideb0e20ebe09945f221cc31560922aae9e375dde
Diffstat (limited to 'csarvalidation/src/test/java/org/onap')
-rw-r--r-- | csarvalidation/src/test/java/org/onap/cvc/csar/CSARArchiveTest.java | 11 |
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()); + + } + } |