model/src/test/java/eu/internetofus/common/model/DummyComplexModelTest.java
/**
   * Should not update with a bad sibling.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see DummyComplexModel#update(DummyComplexModel, DummyValidateContext)
   */
Should not update with a bad sibling.
@param vertx       event bus to use.
@param testContext context to test.


Should not update with a bad sibling . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldNotUpdateWithBadSibling(final Vertx vertx, final VertxTestContext testContext) {
    final var target = this.createModelExample(1);
    final var source = new DummyComplexModel();
    source.siblings = new ArrayList<>();
    source.siblings.add(new DummyComplexModel());
    source.siblings.get(0).id = "0";
    source.siblings.add(new DummyComplexModel());
    source.siblings.get(1).id = "0";
    assertCannotUpdate(target, source, "siblings[1]", new DummyValidateContext("codePrefix"), testContext);
  }
@ Test public void shouldNotUpdateWithBadSibling ( final Vertx vertx , final VertxTestContext testContext ) { final var target = this . createModelExample ( 1 ) ; final var source = new DummyComplexModel ( ) ; source . siblings = new ArrayList < > ( ) ; source . siblings . add ( new DummyComplexModel ( ) ) ; source . siblings . get ( 0 ) . id = "0" ; source . siblings . add ( new DummyComplexModel ( ) ) ; source . siblings . get ( 1 ) . id = "0" ; assertCannotUpdate ( target , source , "siblings[1]" , new DummyValidateContext ( "codePrefix" ) , testContext ) ; }
Should not update with a bad sibling.
Should not update with a bad sibling .