components/src/test/java/eu/internetofus/common/components/task_manager/WeNetTaskManagerTestCase.java
/**
   * Should not add transaction into an undefined transaction.
   *
   * @param vertx       that contains the event bus to use.
   * @param testContext context over the tests.
   */
Should not add transaction into an undefined transaction.
@param vertx       that contains the event bus to use.
@param testContext context over the tests.
Should not add transaction into an undefined transaction . @param vertx that contains the event bus to use . @param testContext context over the tests .
@Test
  public void shouldNotAddMessageIntoUndefinedTransaction(final Vertx vertx, final VertxTestContext testContext) {
    new TaskTest().createModelExample(1, vertx, testContext).onSuccess(task -> {
      task.id = null;
      final var service = this.createComponentProxy(vertx);
      testContext.assertComplete(service.createTask(task)).onSuccess(createdTask -> {
        final var message = new Message();
        testContext
            .assertFailure(
                this.createComponentProxy(vertx).addMessageIntoTransaction(createdTask.id, "undefined", message))
            .onFailure(handler -> testContext.completeNow());
      });
    });
  }
@ Test public void shouldNotAddMessageIntoUndefinedTransaction ( final Vertx vertx , final VertxTestContext testContext ) { new TaskTest ( ) . createModelExample ( 1 , vertx , testContext ) . onSuccess ( task -> { task . id = null ; final var service = this . createComponentProxy ( vertx ) ; testContext . assertComplete ( service . createTask ( task ) ) . onSuccess ( createdTask -> { final var message = new Message ( ) ; testContext . assertFailure ( this . createComponentProxy ( vertx ) . addMessageIntoTransaction ( createdTask . id , "undefined" , message ) ) . onFailure ( handler -> testContext . completeNow ( ) ) ; } ) ; } ) ; }
Should not add transaction into an undefined transaction.
Should not add transaction into an undefined transaction .