components/src/test/java/eu/internetofus/common/components/task_manager/WeNetTaskManagerTestCase.java
/**
   * Should get task types.
   *
   * @param vertx       that contains the event bus to use.
   * @param testContext context over the tests.
   */
Should get task types.
@param vertx       that contains the event bus to use.
@param testContext context over the tests.
Should get task types . @param vertx that contains the event bus to use . @param testContext context over the tests .
@Test
  public void shouldGetTaskTypesPage(final Vertx vertx, final VertxTestContext testContext) {
    testContext.assertComplete(WeNetTaskManager.createProxy(vertx).getTaskTypesPage(null, null, null, null, 0, 10))
        .onSuccess(page -> testContext.verify(() -> {
          assertThat(page).isNotNull();
          assertThat(page.offset).isEqualTo(0);
          if (page.total == 0) {
            assertThat(page.taskTypes).isNull();
          } else {
            assertThat(page.taskTypes).isNotNull().isNotEmpty().hasSizeGreaterThanOrEqualTo(1)
                .hasSizeLessThanOrEqualTo(10);
          }
          testContext.completeNow();
        }));
  }
@ Test public void shouldGetTaskTypesPage ( final Vertx vertx , final VertxTestContext testContext ) { testContext . assertComplete ( WeNetTaskManager . createProxy ( vertx ) . getTaskTypesPage ( null , null , null , null , 0 , 10 ) ) . onSuccess ( page -> testContext . verify ( ( ) -> { assertThat ( page ) . isNotNull ( ) ; assertThat ( page . offset ) . isEqualTo ( 0 ) ; if ( page . total == 0 ) { assertThat ( page . taskTypes ) . isNull ( ) ; } else { assertThat ( page . taskTypes ) . isNotNull ( ) . isNotEmpty ( ) . hasSizeGreaterThanOrEqualTo ( 1 ) . hasSizeLessThanOrEqualTo ( 10 ) ; } testContext . completeNow ( ) ; } ) ) ; }
Should get task types.
Should get task types .