diff options
author | Ram Krishna Verma <ram.krishna.verma@est.tech> | 2019-07-18 11:14:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-18 11:14:22 +0000 |
commit | f2b5c0111e65d1033157da0a1dc09dd3b681cce9 (patch) | |
tree | 92e66068694272ddf15e518fbcd989802a3c0ba4 /utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java | |
parent | 3f54136a63ca29ac2401c2b22a7a66b95faebae3 (diff) | |
parent | 37f4fef730a59fd5230b90e60039b05ed5e4d88b (diff) |
Merge "Convert double to int when decoding via gson"
Diffstat (limited to 'utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java')
-rw-r--r-- | utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java b/utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java index e8e3bb60..2992933f 100644 --- a/utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java +++ b/utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java @@ -201,6 +201,15 @@ public class StandardCoderTest { } @Test + public void testConvertFromDouble() throws Exception { + String text = "[listA, {keyA=100}, 200]"; + assertEquals(text, coder.decode(text, Object.class).toString()); + + text = "{keyB=200}"; + assertEquals(text, coder.decode(text, Object.class).toString()); + } + + @Test public void testToStandard() throws Exception { MyObject obj = new MyObject(); obj.abc = "xyz"; |