protocols/src/test/java/eu/internetofus/common/protocols/EatTogetherV2ProtocolITC.java
/**
   * Check that can not create a task without deadline.
   *
   * @param vertx       event bus to use.
   * @param testContext context to do the test.
   */
Check that can not create a task without deadline.
@param vertx       event bus to use.
@param testContext context to do the test.
Check that can not create a task without deadline . @param vertx event bus to use . @param testContext context to do the test .
@Test
  @Order(22)
  public void shouldNotCreateTaskWithWithoutDeadline(final Vertx vertx, final VertxTestContext testContext) {
    this.assertLastSuccessfulTestWas(4, testContext);
    this.lastSuccessfulTest = 21;
    final var task = this.createTaskForProtocol();
    task.attributes.remove("deadlineTs");
    final var checkMessages = new ArrayList<Predicate<Message>>();
    checkMessages.add(this.createMessagePredicate().and(MessagePredicates.labelIs("TextualMessage"))
        .and(MessagePredicates.receiverIs(task.requesterId)));
    final var future = WeNetTaskManager.createProxy(vertx).createTask(task)
        .compose(ignored -> this.waitUntilCallbacks(vertx, testContext, checkMessages));
    future.onComplete(testContext.succeeding(ignored -> this.assertSuccessfulCompleted(testContext)));
  }
@ Test @ Order ( 22 ) public void shouldNotCreateTaskWithWithoutDeadline ( final Vertx vertx , final VertxTestContext testContext ) { this . assertLastSuccessfulTestWas ( 4 , testContext ) ; this . lastSuccessfulTest = 21 ; final var task = this . createTaskForProtocol ( ) ; task . attributes . remove ( "deadlineTs" ) ; final var checkMessages = new ArrayList < Predicate < Message > > ( ) ; checkMessages . add ( this . createMessagePredicate ( ) . and ( MessagePredicates . labelIs ( "TextualMessage" ) ) . and ( MessagePredicates . receiverIs ( task . requesterId ) ) ) ; final var future = WeNetTaskManager . createProxy ( vertx ) . createTask ( task ) . compose ( ignored -> this . waitUntilCallbacks ( vertx , testContext , checkMessages ) ) ; future . onComplete ( testContext . succeeding ( ignored -> this . assertSuccessfulCompleted ( testContext ) ) ) ; }
Check that can not create a task without deadline.
Check that can not create a task without deadline .