Class JsonUtilsTest
java.lang.Object
test.de.iip_ecosphere.platform.support.iip_aas.JsonUtilsTest
Tests
JsonUtils.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA data object for testing.(package private) static classJson class as it would be generated for -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertEscapeUnescape(String string) Asserts that escaping and unescaping leads back to the inputstring.voidTestsJsonUtils.escape(String)andJsonUtils.unescape(String).voidTestsJson.exceptFields(String...)andJson.toJsonQuiet(Object).voidTests.invalid reference
JsonUtils#handleIipDataClasses(ObjectMapper)voidTests optional values.voidTests the mapping property naming strategy.voidTests the from/to JSON functions forServerAddress.voidTests the generic from/to JSON functions.
-
Constructor Details
-
JsonUtilsTest
public JsonUtilsTest()
-
-
Method Details
-
testOptionals
public void testOptionals()Tests optional values. -
testToFromJson
public void testToFromJson()Tests the generic from/to JSON functions. -
testServerAddress
public void testServerAddress()Tests the from/to JSON functions forServerAddress. -
testEscapeUnescape
public void testEscapeUnescape()TestsJsonUtils.escape(String)andJsonUtils.unescape(String). -
assertEscapeUnescape
Asserts that escaping and unescaping leads back to the inputstring.- Parameters:
string- the string to use
-
testIipTypes
Tests.invalid reference
JsonUtils#handleIipDataClasses(ObjectMapper)- Throws:
IOException- shall not occur
-
testPropertyNaming
Tests the mapping property naming strategy.- Throws:
IOException- shall not occur
-
testExceptFields
TestsJson.exceptFields(String...)andJson.toJsonQuiet(Object).- Throws:
IOException
-