components/src/test/java/eu/internetofus/common/components/models/SocialPracticeTest.java
/**
   * Check that merge removing all materials.
   *
   * @param vertx       event bus to use.
   * @param testContext test context to use.
   *
   * @see SocialPractice#merge(SocialPractice, WeNetValidateContext)
   */
Check that merge removing all materials.
@param vertx       event bus to use.
@param testContext test context to use.


Check that merge removing all materials . @param vertx event bus to use . @param testContext test context to use .
@Test
  public void shouldMergeRemoveMaterials(final Vertx vertx, final VertxTestContext testContext) {
    final var target = this.createModelExample(1);
    target.id = "19";
    final var source = new SocialPractice();
    source.materials = new ArrayList<>();
    assertCanMerge(target, source, new WeNetValidateContext("codePrefix", vertx), testContext, merged -> {
      assertThat(merged).isNotEqualTo(target).isNotEqualTo(source);
      target.materials = new ArrayList<>();
      assertThat(merged).isEqualTo(target);
    });
  }
@ Test public void shouldMergeRemoveMaterials ( final Vertx vertx , final VertxTestContext testContext ) { final var target = this . createModelExample ( 1 ) ; target . id = "19" ; final var source = new SocialPractice ( ) ; source . materials = new ArrayList < > ( ) ; assertCanMerge ( target , source , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext , merged -> { assertThat ( merged ) . isNotEqualTo ( target ) . isNotEqualTo ( source ) ; target . materials = new ArrayList < > ( ) ; assertThat ( merged ) . isEqualTo ( target ) ; } ) ; }
Check that merge removing all materials.
Check that merge removing all materials .