components/src/test/java/eu/internetofus/common/components/models/WeNetUserProfileTest.java
/**
   * Check merge remove personal behaviors.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see WeNetUserProfile#merge(WeNetUserProfile, WeNetValidateContext)
   */
Check merge remove personal behaviors.
@param vertx       event bus to use.
@param testContext context to test.


Check merge remove personal behaviors . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldMergeRemovePersonalBehaviors(final Vertx vertx, final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext).onSuccess(created -> {
      assertIsValid(created, new WeNetValidateContext("codePrefix", vertx), testContext, () -> {
        StoreServices.storeProfile(created, vertx, testContext).onSuccess(target -> {
          final var source = new WeNetUserProfile();
          source.personalBehaviors = new ArrayList<>();
          assertCanMerge(target, source, new WeNetValidateContext("codePrefix", vertx), testContext, merged -> {
            assertThat(merged).isNotEqualTo(target).isNotEqualTo(source);
            target.personalBehaviors.clear();
            assertThat(merged).isEqualTo(target);
            testContext.completeNow();
          });
        });
      });
    });
  }
@ Test public void shouldMergeRemovePersonalBehaviors ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onSuccess ( created -> { assertIsValid ( created , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext , ( ) -> { StoreServices . storeProfile ( created , vertx , testContext ) . onSuccess ( target -> { final var source = new WeNetUserProfile ( ) ; source . personalBehaviors = new ArrayList < > ( ) ; assertCanMerge ( target , source , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext , merged -> { assertThat ( merged ) . isNotEqualTo ( target ) . isNotEqualTo ( source ) ; target . personalBehaviors . clear ( ) ; assertThat ( merged ) . isEqualTo ( target ) ; testContext . completeNow ( ) ; } ) ; } ) ; } ) ; } ) ; }
Check merge remove personal behaviors.
Check merge remove personal behaviors .