components/src/test/java/eu/internetofus/common/components/models/WeNetUserProfileTest.java
/**
   * Check fail merge with a bad new personal behavior.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see WeNetUserProfile#merge(WeNetUserProfile, WeNetValidateContext)
   */
Check fail merge with a bad new personal behavior.
@param vertx       event bus to use.
@param testContext context to test.


Check fail merge with a bad new personal behavior . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldFailMergeBadNewPersonalBehaviors(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<>();
          source.personalBehaviors.add(new Routine());
          assertCannotMerge(target, source, "personalBehaviors[0].label_distribution",
              new WeNetValidateContext("codePrefix", vertx), testContext);
        });
      });
    });
  }
@ Test public void shouldFailMergeBadNewPersonalBehaviors ( 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 < > ( ) ; source . personalBehaviors . add ( new Routine ( ) ) ; assertCannotMerge ( target , source , "personalBehaviors[0].label_distribution" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ; } ) ; } ) ; } ) ; }
Check fail merge with a bad new personal behavior.
Check fail merge with a bad new personal behavior .