components/src/test/java/eu/internetofus/common/components/WeNetValidateContextTest.java
/**
   * Check that validate defined ids field.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see WeNetValidateContext#validateDefinedIdsField
   */
Check that validate defined ids field.
@param vertx       event bus to use.
@param testContext context to test.


Check that validate defined ids field . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldValidateDefinedIdsField(final Vertx vertx, final VertxTestContext testContext) {
    final var ids = Arrays.asList(UUID.randomUUID().toString(), UUID.randomUUID().toString(),
        UUID.randomUUID().toString());
    final var cache = new WeNetValidateContext("codePrefix", vertx);
    testContext
        .assertComplete(cache.validateDefinedIdsField("name", ids, String.class, any -> Future.succeededFuture(true),
            Future.succeededFuture()))
        .onSuccess(any -> testContext
            .assertComplete(cache.validateDefinedIdsField("name", ids, String.class, null, Future.succeededFuture()))
            .onSuccess(any2 -> testContext.completeNow()));
  }
@ Test public void shouldValidateDefinedIdsField ( final Vertx vertx , final VertxTestContext testContext ) { final var ids = Arrays . asList ( UUID . randomUUID ( ) . toString ( ) , UUID . randomUUID ( ) . toString ( ) , UUID . randomUUID ( ) . toString ( ) ) ; final var cache = new WeNetValidateContext ( "codePrefix" , vertx ) ; testContext . assertComplete ( cache . validateDefinedIdsField ( "name" , ids , String . class , any -> Future . succeededFuture ( true ) , Future . succeededFuture ( ) ) ) . onSuccess ( any -> testContext . assertComplete ( cache . validateDefinedIdsField ( "name" , ids , String . class , null , Future . succeededFuture ( ) ) ) . onSuccess ( any2 -> testContext . completeNow ( ) ) ) ; }
Check that validate defined ids field.
Check that validate defined ids field .