protocols/src/test/java/eu/internetofus/common/protocols/Ask4HelpV1_2ProtocolITC.java
/**
   * Check that ask some more users.
   *
   * @param vertx       event bus to use.
   * @param testContext context to do the test.
   */
Check that ask some more users.
@param vertx       event bus to use.
@param testContext context to do the test.
Check that ask some more users . @param vertx event bus to use . @param testContext context to do the test .
@Test
  @Order(8)
  public void shouldAskSomeMoreUsers(final Vertx vertx, final VertxTestContext testContext) {
    this.assertLastSuccessfulTestWas(7, testContext);
    final var transaction = new TaskTransaction();
    transaction.actioneerId = this.task.requesterId;
    transaction.taskId = this.task.id;
    transaction.label = "moreAnswerTransaction";
    final var checkTask = this.createTaskPredicate().and(TaskPredicates.transactionSizeIs(6)).and(TaskPredicates
        .transactionAt(5, this.createTaskTransactionPredicate().and(TaskTransactionPredicates.similarTo(transaction))));
    final var checkStatus = new ArrayList<Predicate<TaskTransactionStatusBody>>();
    checkStatus.add(this.createIncentiveServerTaskTransactionStatusPredicate()
        .and(TaskTransactionStatusBodyPredicates.labelIs(transaction.label))
        .and(TaskTransactionStatusBodyPredicates.countIs(1))
        .and(TaskTransactionStatusBodyPredicates.userIs(transaction.actioneerId)));
    final var future = WeNetTaskManager.createProxy(vertx).doTaskTransaction(transaction)
        .compose(ignored -> this.waitUntilTask(vertx, testContext, checkTask))
        .compose(ignored -> this.waitUntilIncentiveServerHasTaskTransactionStatus(vertx, testContext, checkStatus));
    future.onComplete(testContext.succeeding(ignored -> this.assertSuccessfulCompleted(testContext)));
  }
@ Test @ Order ( 8 ) public void shouldAskSomeMoreUsers ( final Vertx vertx , final VertxTestContext testContext ) { this . assertLastSuccessfulTestWas ( 7 , testContext ) ; final var transaction = new TaskTransaction ( ) ; transaction . actioneerId = this . task . requesterId ; transaction . taskId = this . task . id ; transaction . label = "moreAnswerTransaction" ; final var checkTask = this . createTaskPredicate ( ) . and ( TaskPredicates . transactionSizeIs ( 6 ) ) . and ( TaskPredicates . transactionAt ( 5 , this . createTaskTransactionPredicate ( ) . and ( TaskTransactionPredicates . similarTo ( transaction ) ) ) ) ; final var checkStatus = new ArrayList < Predicate < TaskTransactionStatusBody > > ( ) ; checkStatus . add ( this . createIncentiveServerTaskTransactionStatusPredicate ( ) . and ( TaskTransactionStatusBodyPredicates . labelIs ( transaction . label ) ) . and ( TaskTransactionStatusBodyPredicates . countIs ( 1 ) ) . and ( TaskTransactionStatusBodyPredicates . userIs ( transaction . actioneerId ) ) ) ; final var future = WeNetTaskManager . createProxy ( vertx ) . doTaskTransaction ( transaction ) . compose ( ignored -> this . waitUntilTask ( vertx , testContext , checkTask ) ) . compose ( ignored -> this . waitUntilIncentiveServerHasTaskTransactionStatus ( vertx , testContext , checkStatus ) ) ; future . onComplete ( testContext . succeeding ( ignored -> this . assertSuccessfulCompleted ( testContext ) ) ) ; }
Check that ask some more users.
Check that ask some more users .