components/src/test/java/eu/internetofus/common/components/models/CommunityProfileTest.java
/**
   * Create an example model that has the specified index.
   *
   * @param index       to use in the example.
   * @param vertx       event bus to use.
   * @param testContext test context to use.
   *
   * @return the community profile.
   */
Create an example model that has the specified index.
@param index       to use in the example.
@param vertx       event bus to use.
@param testContext test context to use.

@return the community profile.
Create an example model that has the specified index . @param index to use in the example . @param vertx event bus to use . @param testContext test context to use . @return the community profile .
public Future<CommunityProfile> createModelExample(final int index, final Vertx vertx,
      final VertxTestContext testContext) {
    final Promise<CommunityProfile> promise = Promise.promise();
    StoreServices.storeApp(new App(), vertx, testContext).onSuccess(storedApp -> {
      testContext.assertComplete(new CommunityMemberTest().createModelExample(index, vertx, testContext))
          .onSuccess(member -> {
            final var model = this.createModelExample(index);
            model.appId = storedApp.appId;
            model.members.clear();
            model.members.add(member);
            model.norms = null;
            model.socialPractices = null;
            promise.complete(model);
          });
    });
    return promise.future();
  }
public Future < CommunityProfile > createModelExample ( final int index , final Vertx vertx , final VertxTestContext testContext ) { final Promise < CommunityProfile > promise = Promise . promise ( ) ; StoreServices . storeApp ( new App ( ) , vertx , testContext ) . onSuccess ( storedApp -> { testContext . assertComplete ( new CommunityMemberTest ( ) . createModelExample ( index , vertx , testContext ) ) . onSuccess ( member -> { final var model = this . createModelExample ( index ) ; model . appId = storedApp . appId ; model . members . clear ( ) ; model . members . add ( member ) ; model . norms = null ; model . socialPractices = null ; promise . complete ( model ) ; } ) ; } ) ; return promise . future ( ) ; }
Create an example model that has the specified index.
Create an example model that has the specified index .