Class JsonUtilsTest

java.lang.Object
test.de.iip_ecosphere.platform.support.iip_aas.JsonUtilsTest

public class JsonUtilsTest extends Object
Tests JsonUtils.
Author:
Holger Eichelberger, SSE
  • 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 for ServerAddress.
    • testEscapeUnescape

      public void testEscapeUnescape()
      Tests JsonUtils.escape(String) and JsonUtils.unescape(String).
    • assertEscapeUnescape

      private static void assertEscapeUnescape(String string)
      Asserts that escaping and unescaping leads back to the input string.
      Parameters:
      string - the string to use
    • testIipTypes

      public void testIipTypes() throws IOException
      Tests
      invalid reference
      JsonUtils#handleIipDataClasses(ObjectMapper)
      .
      Throws:
      IOException - shall not occur
    • testPropertyNaming

      public void testPropertyNaming() throws IOException
      Tests the mapping property naming strategy.
      Throws:
      IOException - shall not occur
    • testExceptFields

      public void testExceptFields() throws IOException
      Tests Json.exceptFields(String...) and Json.toJsonQuiet(Object).
      Throws:
      IOException