model/src/test/java/eu/internetofus/common/model/ModelTestCase.java
/**
   * Check that is converted with the empty values.
   */
Check that is converted with the empty values.
Check that is converted with the empty values .
@Test
  public void shouldToJsonObjectWithEmptyValues() {
    final var model = this.createModelExample(1);
    @SuppressWarnings("unchecked")
    final var emptyModel = (T) Model.fromString("{}", model.getClass());
    assertThat(emptyModel).isNotNull();
    final var emptyObject = emptyModel.toJsonObjectWithEmptyValues();
    assertThat(emptyObject).isNotNull().isNotEqualTo(new JsonObject());
    assertThat(emptyObject.fieldNames()).isNotEmpty();
  }
@ Test public void shouldToJsonObjectWithEmptyValues ( ) { final var model = this . createModelExample ( 1 ) ; @ SuppressWarnings ( "unchecked" ) final var emptyModel = ( T ) Model . fromString ( "{}" , model . getClass ( ) ) ; assertThat ( emptyModel ) . isNotNull ( ) ; final var emptyObject = emptyModel . toJsonObjectWithEmptyValues ( ) ; assertThat ( emptyObject ) . isNotNull ( ) . isNotEqualTo ( new JsonObject ( ) ) ; assertThat ( emptyObject . fieldNames ( ) ) . isNotEmpty ( ) ; }
Check that is converted with the empty values.
Check that is converted with the empty values .