components/src/test/java/eu/internetofus/common/components/models/TaskTransactionTest.java
/**
   * A task transaction without a type with transaction but any is the label.
   *
   * @param vertx       event bus to use.
   * @param testContext test context to use.
   *
   * @see TaskTransaction#validate(WeNetValidateContext)
   */
A task transaction without a type with transaction but any is the label.
@param vertx       event bus to use.
@param testContext test context to use.


A task transaction without a type with transaction but any is the label . @param vertx event bus to use . @param testContext test context to use .
@Test
  public void shouldTaskTransactionBeNotValidWithTaskTypeWithoutLabelTransaction(final Vertx vertx,
      final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext)
        .onComplete(testContext.succeeding(model -> WeNetTaskManager.createProxy(vertx).retrieveTask(model.taskId)
            .compose(task -> WeNetTaskManager.createProxy(vertx).deleteTaskType(task.taskTypeId).compose(empty -> {
              final var newType = new TaskType();
              newType.id = task.taskTypeId;
              newType.transactions = new JsonObject().put("undefined", new JsonObject());
              return WeNetTaskManager.createProxy(vertx).createTaskType(newType);
            })).onComplete(testContext.succeeding(empty -> assertIsNotValid(model, "label",
                new WeNetValidateContext("codePrefix", vertx), testContext)))));
  }
@ Test public void shouldTaskTransactionBeNotValidWithTaskTypeWithoutLabelTransaction ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onComplete ( testContext . succeeding ( model -> WeNetTaskManager . createProxy ( vertx ) . retrieveTask ( model . taskId ) . compose ( task -> WeNetTaskManager . createProxy ( vertx ) . deleteTaskType ( task . taskTypeId ) . compose ( empty -> { final var newType = new TaskType ( ) ; newType . id = task . taskTypeId ; newType . transactions = new JsonObject ( ) . put ( "undefined" , new JsonObject ( ) ) ; return WeNetTaskManager . createProxy ( vertx ) . createTaskType ( newType ) ; } ) ) . onComplete ( testContext . succeeding ( empty -> assertIsNotValid ( model , "label" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ) ) ) ) ; }
A task transaction without a type with transaction but any is the label.
A task transaction without a type with transaction but any is the label .