protocols/src/test/java/eu/internetofus/common/protocols/EatTogetherV2ProtocolITC.java
/**
   * Assert that can not do a task transaction on the eat together protocol and
   * receive an error message.
   *
   * @param taskTransaction that can not be done in the protocol.
   * @param vertx           event bus to use.
   * @param testContext     context to do the test.
   */
Assert that can not do a task transaction on the eat together protocol and
receive an error message.

@param taskTransaction that can not be done in the protocol.
@param vertx           event bus to use.
@param testContext     context to do the test.
Assert that can not do a task transaction on the eat together protocol and receive an error message . @param taskTransaction that can not be done in the protocol . @param vertx event bus to use . @param testContext context to do the test .
protected void assertDoTransactionError(final TaskTransaction taskTransaction, final Vertx vertx,
      final VertxTestContext testContext) {
    final var checkTask = this.createTaskPredicate()
        .and(TaskPredicates.transactionSizeIs(this.task.transactions.size()))
        .and(TaskPredicates.attributesAre(this.task.attributes.copy()));
    final var checkMessages = new ArrayList<Predicate<Message>>();
    checkMessages.add(this.createMessagePredicate().and(MessagePredicates.labelIs("TextualMessage"))
        .and(MessagePredicates.receiverIs(taskTransaction.actioneerId)));
    final var checkStatus = new ArrayList<Predicate<TaskTransactionStatusBody>>();
    checkStatus.add(this.createIncentiveServerTaskTransactionStatusPredicate()
        .and(TaskTransactionStatusBodyPredicates.labelIs("TextualMessage"))
        .and(TaskTransactionStatusBodyPredicates.userIs(taskTransaction.actioneerId))
        .and(TaskTransactionStatusBodyPredicates.countIs(1)));
    final var future = WeNetTaskManager.createProxy(vertx).doTaskTransaction(taskTransaction)
        .compose(done -> this.waitUntilCallbacks(vertx, testContext, checkMessages))
        .compose(done -> this.waitUntilTask(vertx, testContext, checkTask));
    future.onComplete(testContext.succeeding(ignored -> this.assertSuccessfulCompleted(testContext)));
  }
protected void assertDoTransactionError ( final TaskTransaction taskTransaction , final Vertx vertx , final VertxTestContext testContext ) { final var checkTask = this . createTaskPredicate ( ) . and ( TaskPredicates . transactionSizeIs ( this . task . transactions . size ( ) ) ) . and ( TaskPredicates . attributesAre ( this . task . attributes . copy ( ) ) ) ; final var checkMessages = new ArrayList < Predicate < Message > > ( ) ; checkMessages . add ( this . createMessagePredicate ( ) . and ( MessagePredicates . labelIs ( "TextualMessage" ) ) . and ( MessagePredicates . receiverIs ( taskTransaction . actioneerId ) ) ) ; final var checkStatus = new ArrayList < Predicate < TaskTransactionStatusBody > > ( ) ; checkStatus . add ( this . createIncentiveServerTaskTransactionStatusPredicate ( ) . and ( TaskTransactionStatusBodyPredicates . labelIs ( "TextualMessage" ) ) . and ( TaskTransactionStatusBodyPredicates . userIs ( taskTransaction . actioneerId ) ) . and ( TaskTransactionStatusBodyPredicates . countIs ( 1 ) ) ) ; final var future = WeNetTaskManager . createProxy ( vertx ) . doTaskTransaction ( taskTransaction ) . compose ( done -> this . waitUntilCallbacks ( vertx , testContext , checkMessages ) ) . compose ( done -> this . waitUntilTask ( vertx , testContext , checkTask ) ) ; future . onComplete ( testContext . succeeding ( ignored -> this . assertSuccessfulCompleted ( testContext ) ) ) ; }
Assert that can not do a task transaction on the eat together protocol and
 receive an error message.
Assert that can not do a task transaction on the eat together protocol and receive an error message .