components/src/test/java/eu/internetofus/common/components/profile_manager/WeNetProfileManagerITCase.java
/**
   * Should retrieve communities page.
   *
   * @param vertx       that contains the event bus to use.
   * @param testContext context over the tests.
   */
Should retrieve communities page.
@param vertx       that contains the event bus to use.
@param testContext context over the tests.
Should retrieve communities page . @param vertx that contains the event bus to use . @param testContext context over the tests .
@Test
  public void shouldRetrieveCommunityProfilesPage(final Vertx vertx, final VertxTestContext testContext) {
    StoreServices.storeCommunityExample(1, vertx, testContext).onSuccess(community -> {
      StoreServices.storeCommunityExample(2, vertx, testContext).onSuccess(community2 -> {
        StoreServices.storeCommunityExample(3, vertx, testContext).onSuccess(community3 -> {
          StoreServices.storeCommunityExample(4, vertx, testContext).onSuccess(community4 -> {
            testContext.assertComplete(WeNetProfileManager.createProxy(vertx).retrieveCommunityProfilesPage(null, null, null, null, null, null, 1, 3).onSuccess(page -> testContext.verify(() -> {
              assertThat(page).isNotNull();
              assertThat(page.offset).isEqualTo(1);
              assertThat(page.total).isGreaterThan(3);
              assertThat(page.communities).isNotEmpty().hasSize(3);
              testContext.completeNow();
            })));
          });
        });
      });
    });
  }
@ Test public void shouldRetrieveCommunityProfilesPage ( final Vertx vertx , final VertxTestContext testContext ) { StoreServices . storeCommunityExample ( 1 , vertx , testContext ) . onSuccess ( community -> { StoreServices . storeCommunityExample ( 2 , vertx , testContext ) . onSuccess ( community2 -> { StoreServices . storeCommunityExample ( 3 , vertx , testContext ) . onSuccess ( community3 -> { StoreServices . storeCommunityExample ( 4 , vertx , testContext ) . onSuccess ( community4 -> { testContext . assertComplete ( WeNetProfileManager . createProxy ( vertx ) . retrieveCommunityProfilesPage ( null , null , null , null , null , null , 1 , 3 ) . onSuccess ( page -> testContext . verify ( ( ) -> { assertThat ( page ) . isNotNull ( ) ; assertThat ( page . offset ) . isEqualTo ( 1 ) ; assertThat ( page . total ) . isGreaterThan ( 3 ) ; assertThat ( page . communities ) . isNotEmpty ( ) . hasSize ( 3 ) ; testContext . completeNow ( ) ; } ) ) ) ; } ) ; } ) ; } ) ; } ) ; }
Should retrieve communities page.
Should retrieve communities page .