protocols/src/test/java/eu/internetofus/common/protocols/AbstractAsk4HelpV2_2ProtocolRandomUsersITC.java
/**
   * Check that can report the question.
   *
   * @param vertx       event bus to use.
   * @param testContext context to do the test.
   */
Check that can report the question.
@param vertx       event bus to use.
@param testContext context to do the test.
Check that can report the question . @param vertx event bus to use . @param testContext context to do the test .
@Test
  @Order(10)
  public void shouldReportQuestionTransaction(final Vertx vertx, final VertxTestContext testContext) {
    this.assertLastSuccessfulTestWas(8, testContext);
    this.lastSuccessfulTest = 9;
    final var reportQuestionTransaction = new TaskTransaction();
    reportQuestionTransaction.taskId = this.task.id;
    reportQuestionTransaction.actioneerId = this.expectedNewParticipants.get(1);
    reportQuestionTransaction.label = "reportQuestionTransaction";
    reportQuestionTransaction.attributes = new JsonObject().put("reason", "abusive");
    final var checkTask = this.createTaskPredicate().and(TaskPredicates.lastTransactionIs(
        this.createTaskTransactionPredicate().and(TaskTransactionPredicates.similarTo(reportQuestionTransaction))));
    final Future<?> future = WeNetTaskManager.createProxy(vertx).doTaskTransaction(reportQuestionTransaction)
        .compose(ignored -> this.waitUntilTask(vertx, testContext, checkTask));
    future.onComplete(testContext.succeeding(ignored -> this.assertSuccessfulCompleted(testContext)));
  }
@ Test @ Order ( 10 ) public void shouldReportQuestionTransaction ( final Vertx vertx , final VertxTestContext testContext ) { this . assertLastSuccessfulTestWas ( 8 , testContext ) ; this . lastSuccessfulTest = 9 ; final var reportQuestionTransaction = new TaskTransaction ( ) ; reportQuestionTransaction . taskId = this . task . id ; reportQuestionTransaction . actioneerId = this . expectedNewParticipants . get ( 1 ) ; reportQuestionTransaction . label = "reportQuestionTransaction" ; reportQuestionTransaction . attributes = new JsonObject ( ) . put ( "reason" , "abusive" ) ; final var checkTask = this . createTaskPredicate ( ) . and ( TaskPredicates . lastTransactionIs ( this . createTaskTransactionPredicate ( ) . and ( TaskTransactionPredicates . similarTo ( reportQuestionTransaction ) ) ) ) ; final Future < ? > future = WeNetTaskManager . createProxy ( vertx ) . doTaskTransaction ( reportQuestionTransaction ) . compose ( ignored -> this . waitUntilTask ( vertx , testContext , checkTask ) ) ; future . onComplete ( testContext . succeeding ( ignored -> this . assertSuccessfulCompleted ( testContext ) ) ) ; }
Check that can report the question.
Check that can report the question .