components/src/test/java/eu/internetofus/common/components/models/CommunityProfileTest.java
/**
   * Check that it is not valid if the identifier exist.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see CommunityProfile#validate(WeNetValidateContext)
   */
Check that it is not valid if the identifier exist.
@param vertx       event bus to use.
@param testContext context to test.


Check that it is not valid if the identifier exist . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldNotBeValidWithADefinedId(final Vertx vertx, final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext).onSuccess(model -> {
      StoreServices.storeCommunityExample(200, vertx, testContext).onSuccess(storedModel -> {
        model.id = storedModel.id;
        assertIsNotValid(model, "id", new WeNetValidateContext("codePrefix", vertx), testContext);
      });
    });
  }
@ Test public void shouldNotBeValidWithADefinedId ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onSuccess ( model -> { StoreServices . storeCommunityExample ( 200 , vertx , testContext ) . onSuccess ( storedModel -> { model . id = storedModel . id ; assertIsNotValid ( model , "id" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ; } ) ; } ) ; }
Check that it is not valid if the identifier exist.
Check that it is not valid if the identifier exist .