model/src/test/java/eu/internetofus/common/model/JsonObjectDeserializerTest.java
/**
   * Should deserialize a json object.
   */
Should deserialize a json object.
Should deserialize a json object .
@Test
  public void shouldDeserializeObject() {
    final var source = new ModelWithObject();
    source.content = new JsonObject().put("string", "string").put("number", 1).put("array",
        new JsonArray().add("1").add("2").add("3"));
    final var coded = source.toJsonString();
    assertThat(coded).isNotNull();
    final var target = Model.fromString(coded, ModelWithObject.class);
    assertThat(target).isEqualTo(source);
  }
@ Test public void shouldDeserializeObject ( ) { final var source = new ModelWithObject ( ) ; source . content = new JsonObject ( ) . put ( "string" , "string" ) . put ( "number" , 1 ) . put ( "array" , new JsonArray ( ) . add ( "1" ) . add ( "2" ) . add ( "3" ) ) ; final var coded = source . toJsonString ( ) ; assertThat ( coded ) . isNotNull ( ) ; final var target = Model . fromString ( coded , ModelWithObject . class ) ; assertThat ( target ) . isEqualTo ( source ) ; }
Should deserialize a json object.
Should deserialize a json object .