components/src/test/java/eu/internetofus/common/components/models/TaskTest.java
/**
   * Check that update when only is modified the {@link Task#appId}.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see Task#update(Task, WeNetValidateContext)
   */
Check that update when only is modified the  Task#appId.
@param vertx       event bus to use.
@param testContext context to test.


Check that update when only is modified the Task#appId . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldOnlyUpdateAppId(final Vertx vertx, final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext).onSuccess(targetToStore -> {
      StoreServices.storeTask(targetToStore, vertx, testContext).onSuccess(target -> {
        StoreServices.storeApp(new App(), vertx, testContext).onSuccess(app -> {
          final var source = Model.fromJsonObject(target.toJsonObject(), Task.class);
          source.appId = app.appId;
          assertCanUpdate(target, source, new WeNetValidateContext("codePrefix", vertx), testContext, updated -> {
            assertThat(updated).isNotEqualTo(target).isEqualTo(source);
            target.appId = app.appId;
            assertThat(updated).isEqualTo(target);
          });
        });
      });
    });
  }
@ Test public void shouldOnlyUpdateAppId ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onSuccess ( targetToStore -> { StoreServices . storeTask ( targetToStore , vertx , testContext ) . onSuccess ( target -> { StoreServices . storeApp ( new App ( ) , vertx , testContext ) . onSuccess ( app -> { final var source = Model . fromJsonObject ( target . toJsonObject ( ) , Task . class ) ; source . appId = app . appId ; assertCanUpdate ( target , source , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext , updated -> { assertThat ( updated ) . isNotEqualTo ( target ) . isEqualTo ( source ) ; target . appId = app . appId ; assertThat ( updated ) . isEqualTo ( target ) ; } ) ; } ) ; } ) ; } ) ; }
Check that update when only is modified the {@link Task#appId}.
Check that update when only is modified the { @link Task#appId } .