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