protocols/src/test/java/eu/internetofus/common/protocols/EatTogetherV2ProtocolITC.java
/**
   * Check that an user can not complete a closed task.
   *
   * @param outcome     that can not be set to a closed task.
   * @param order       of the parameterized test.
   * @param vertx       event bus to use.
   * @param testContext context to do the test.
   */
Check that an user can not complete a closed task.
@param outcome     that can not be set to a closed task.
@param order       of the parameterized test.
@param vertx       event bus to use.
@param testContext context to do the test.
Check that an user can not complete a closed task . @param outcome that can not be set to a closed task . @param order of the parameterized test . @param vertx event bus to use . @param testContext context to do the test .
@ParameterizedTest(name = "Should not complete a task with the outcome {0}")
  @CsvSource(value = { "cancelled:0", "completed:1", "failed:2" }, delimiter = ':')
  @Order(15)
  public void shouldNotChangeCompletedAClosedTask(final String outcome, final String order, final Vertx vertx,
      final VertxTestContext testContext) {
    this.assertLastSuccessfulTestWas(14 + Integer.parseInt(order), testContext);
    final var taskTransaction = new TaskTransaction();
    taskTransaction.actioneerId = this.task.requesterId;
    taskTransaction.taskId = this.task.id;
    taskTransaction.label = "taskCompleted";
    taskTransaction.attributes = new JsonObject().put("outcome", outcome);
    this.assertDoTransactionError(taskTransaction, vertx, testContext);
  }
@ ParameterizedTest ( name = "Should not complete a task with the outcome {0}" ) @ CsvSource ( value = { "cancelled:0" , "completed:1" , "failed:2" } , delimiter = ':' ) @ Order ( 15 ) public void shouldNotChangeCompletedAClosedTask ( final String outcome , final String order , final Vertx vertx , final VertxTestContext testContext ) { this . assertLastSuccessfulTestWas ( 14 + Integer . parseInt ( order ) , testContext ) ; final var taskTransaction = new TaskTransaction ( ) ; taskTransaction . actioneerId = this . task . requesterId ; taskTransaction . taskId = this . task . id ; taskTransaction . label = "taskCompleted" ; taskTransaction . attributes = new JsonObject ( ) . put ( "outcome" , outcome ) ; this . assertDoTransactionError ( taskTransaction , vertx , testContext ) ; }
Check that an user can not complete a closed task.
Check that an user can not complete a closed task .