components/src/test/java/eu/internetofus/common/components/incentive_server/WeNetIncentiveServerTestCase.java
/**
   * Should update the task transaction status.
   *
   * @param vertx       that contains the event bus to use.
   * @param testContext context over the tests.
   */
Should update the task transaction status.
@param vertx       that contains the event bus to use.
@param testContext context over the tests.
Should update the task transaction status . @param vertx that contains the event bus to use . @param testContext context over the tests .
@Test
  public void shouldUpdateTaskTransactionStatus(final Vertx vertx, final VertxTestContext testContext) {
    final var transactionStatus = new TaskTransactionStatusBodyTest().createModelExample(1);
    this.createComponentProxy(vertx).updateTaskTransactionStatus(transactionStatus)
        .compose(result -> WeNetIncentiveServerSimulator.createProxy(vertx).getTaskTransactionStatus())
        .onComplete(testContext.succeeding(status -> testContext.verify(() -> {
          assertThat(status).isNotEmpty().contains(transactionStatus);
          WeNetIncentiveServerSimulator.createProxy(vertx).deleteTaskTransactionStatus()
              .compose(empty -> WeNetIncentiveServerSimulator.createProxy(vertx).getTaskTransactionStatus())
              .onComplete(testContext.succeeding(status2 -> testContext.verify(() -> {
                assertThat(status2).isEmpty();
                testContext.completeNow();
              })));
        })));
  }
@ Test public void shouldUpdateTaskTransactionStatus ( final Vertx vertx , final VertxTestContext testContext ) { final var transactionStatus = new TaskTransactionStatusBodyTest ( ) . createModelExample ( 1 ) ; this . createComponentProxy ( vertx ) . updateTaskTransactionStatus ( transactionStatus ) . compose ( result -> WeNetIncentiveServerSimulator . createProxy ( vertx ) . getTaskTransactionStatus ( ) ) . onComplete ( testContext . succeeding ( status -> testContext . verify ( ( ) -> { assertThat ( status ) . isNotEmpty ( ) . contains ( transactionStatus ) ; WeNetIncentiveServerSimulator . createProxy ( vertx ) . deleteTaskTransactionStatus ( ) . compose ( empty -> WeNetIncentiveServerSimulator . createProxy ( vertx ) . getTaskTransactionStatus ( ) ) . onComplete ( testContext . succeeding ( status2 -> testContext . verify ( ( ) -> { assertThat ( status2 ) . isEmpty ( ) ; testContext . completeNow ( ) ; } ) ) ) ; } ) ) ) ; }
Should update the task transaction status.
Should update the task transaction status .