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


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