components/src/test/java/eu/internetofus/common/components/models/TaskTest.java
/**
   * Check that not update whit a task type that not match the task attributes.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see Task#update(Task, WeNetValidateContext)
   */
Check that not update whit a task type that not match the task attributes.
@param vertx       event bus to use.
@param testContext context to test.


Check that not update whit a task type that not match the task attributes . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldNotUpdateTaskTypeIdBecauseAttributesNotMatch(final Vertx vertx,
      final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext).onSuccess(targetToStore -> {
      StoreServices.storeTask(targetToStore, vertx, testContext).onSuccess(target -> {
        StoreServices.storeTaskType(new TaskType(), vertx, testContext).onSuccess(taskType -> {
          final var source = Model.fromJsonObject(target.toJsonObject(), Task.class);
          source.taskTypeId = taskType.id;
          assertCannotUpdate(target, source, "attributes", new WeNetValidateContext("codePrefix", vertx), testContext);
        });
      });
    });
  }
@ Test public void shouldNotUpdateTaskTypeIdBecauseAttributesNotMatch ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onSuccess ( targetToStore -> { StoreServices . storeTask ( targetToStore , vertx , testContext ) . onSuccess ( target -> { StoreServices . storeTaskType ( new TaskType ( ) , vertx , testContext ) . onSuccess ( taskType -> { final var source = Model . fromJsonObject ( target . toJsonObject ( ) , Task . class ) ; source . taskTypeId = taskType . id ; assertCannotUpdate ( target , source , "attributes" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ; } ) ; } ) ; } ) ; }
Check that not update whit a task type that not match the task attributes.
Check that not update whit a task type that not match the task attributes .