components/src/test/java/eu/internetofus/common/components/models/SocialNetworkRelationshipTest.java
/**
   * Check that merge only the app identifier.
   *
   * @param vertx       event bus to use.
   * @param testContext test context to use.
   *
   * @see RelevantLocation#merge(RelevantLocation, WeNetValidateContext)
   */
Check that merge only the app identifier.
@param vertx       event bus to use.
@param testContext test context to use.


Check that merge only the app identifier . @param vertx event bus to use . @param testContext test context to use .
@Test
  public void shouldMergeOnlyAppId(final Vertx vertx, final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext).onSuccess(target -> {
      StoreServices.storeApp(new App(), vertx, testContext).onSuccess(app -> {
        final var source = new SocialNetworkRelationship();
        source.appId = app.appId;
        assertCanMerge(target, source, new WeNetValidateContext("codePrefix", vertx), testContext, merged -> {
          assertThat(merged).isNotEqualTo(source).isNotEqualTo(target).isNotSameAs(target).isNotSameAs(source);
          target.appId = app.appId;
          assertThat(merged).isEqualTo(target);
        });
      });
    });
  }
@ Test public void shouldMergeOnlyAppId ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onSuccess ( target -> { StoreServices . storeApp ( new App ( ) , vertx , testContext ) . onSuccess ( app -> { final var source = new SocialNetworkRelationship ( ) ; source . appId = app . appId ; assertCanMerge ( target , source , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext , merged -> { assertThat ( merged ) . isNotEqualTo ( source ) . isNotEqualTo ( target ) . isNotSameAs ( target ) . isNotSameAs ( source ) ; target . appId = app . appId ; assertThat ( merged ) . isEqualTo ( target ) ; } ) ; } ) ; } ) ; }
Check that merge only the app identifier.
Check that merge only the app identifier .