Add common coder classes 69/79269/3
authorJim Hahn <jrh3@att.com>
Wed, 27 Feb 2019 15:08:55 +0000 (10:08 -0500)
committerJim Hahn <jrh3@att.com>
Wed, 27 Feb 2019 15:30:34 +0000 (10:30 -0500)
commitb8432fe028654dbf538cd0cc79cebe5e6093acb6
tree47e431410f7ad3f0fc575ebf5fc8ed42b52e7bba
parent9e43e5a72b77ba4701dfd320bf6cefaffaaa3823
Add common coder classes

Added coder classes as a common utility that can be used to encode
and decode json data.  Currently, it uses gson, but that can be
changed.

Separated the Coder interface from implementation.

Used assertSame to compare references.
Used numbers instead of strings so don't have to deal with escaping quotes
in the test cases.

Change-Id: Iea9001d2adc5a3150b3367619b5f43e96b5f8b41
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
utils/pom.xml
utils/src/main/java/org/onap/policy/common/utils/coder/Coder.java [new file with mode: 0644]
utils/src/main/java/org/onap/policy/common/utils/coder/CoderException.java [new file with mode: 0644]
utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java [new file with mode: 0644]
utils/src/test/java/org/onap/policy/common/utils/coder/CoderExceptionTest.java [new file with mode: 0644]
utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java [new file with mode: 0644]