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


Check that fail validate not defined by id field . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldFailValidateNotDefinedIdField(final Vertx vertx, final VertxTestContext testContext) {
    final var id = UUID.randomUUID().toString();
    final var cache = new WeNetValidateContext("codePrefix", vertx);
    testContext
        .assertFailure(cache.validateNotDefinedIdField("name", id, String.class,
            any -> Future.failedFuture("Error not found"), Future.succeededFuture()))
        .onFailure(any -> testContext
            .assertFailure(cache.validateNotDefinedIdField("name", id, String.class,
                any2 -> Future.succeededFuture(true), Future.succeededFuture()))
            .onFailure(any2 -> testContext
                .assertFailure(
                    cache.validateNotDefinedIdField("name", id, String.class, null, Future.succeededFuture()))
                .onFailure(any3 -> testContext.completeNow())));
  }
@ Test public void shouldFailValidateNotDefinedIdField ( final Vertx vertx , final VertxTestContext testContext ) { final var id = UUID . randomUUID ( ) . toString ( ) ; final var cache = new WeNetValidateContext ( "codePrefix" , vertx ) ; testContext . assertFailure ( cache . validateNotDefinedIdField ( "name" , id , String . class , any -> Future . failedFuture ( "Error not found" ) , Future . succeededFuture ( ) ) ) . onFailure ( any -> testContext . assertFailure ( cache . validateNotDefinedIdField ( "name" , id , String . class , any2 -> Future . succeededFuture ( true ) , Future . succeededFuture ( ) ) ) . onFailure ( any2 -> testContext . assertFailure ( cache . validateNotDefinedIdField ( "name" , id , String . class , null , Future . succeededFuture ( ) ) ) . onFailure ( any3 -> testContext . completeNow ( ) ) ) ) ; }
Check that fail validate not defined by id field.
Check that fail validate not defined by id field .