model/src/test/java/eu/internetofus/common/model/ModelTest.java
/**
   * Check that can convert a json array to a string list.
   *
   * @param testContext context for the test.
   *
   * @see Model#fromFutureJsonArray(Future, Class)
   */
Check that can convert a json array to a string list.
@param testContext context for the test.


Check that can convert a json array to a string list . @param testContext context for the test .
@Test
  public void shouldFromFutureJsonArrayToAStringList(final VertxTestContext testContext) {
    final var array = new JsonArray();
    array.add("One");
    array.add("2");
    array.add("3.0");
    Model.fromFutureJsonArray(Future.succeededFuture(array), String.class)
        .onComplete(testContext.succeeding(target -> testContext.verify(() -> {
          assertThat(target).isNotNull().hasSize(3).containsExactly("One", "2", "3.0");
          testContext.completeNow();
        })));
  }
@ Test public void shouldFromFutureJsonArrayToAStringList ( final VertxTestContext testContext ) { final var array = new JsonArray ( ) ; array . add ( "One" ) ; array . add ( "2" ) ; array . add ( "3.0" ) ; Model . fromFutureJsonArray ( Future . succeededFuture ( array ) , String . class ) . onComplete ( testContext . succeeding ( target -> testContext . verify ( ( ) -> { assertThat ( target ) . isNotNull ( ) . hasSize ( 3 ) . containsExactly ( "One" , "2" , "3.0" ) ; testContext . completeNow ( ) ; } ) ) ) ; }
Check that can convert a json array to a string list.
Check that can convert a json array to a string list .