components/src/test/java/eu/internetofus/common/components/models/TaskTypeTest.java
/**
   * Check that the model does not with bad norm.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see TaskType#update(TaskType, WeNetValidateContext)
   */
Check that the model does not with bad norm.
@param vertx       event bus to use.
@param testContext context to test.


Check that the model does not with bad norm . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldNotUpdateWithABadNorm(final Vertx vertx, final VertxTestContext testContext) {
    final var target = this.createModelExample(1);
    final var source = Model.fromJsonObject(target.toJsonObject(), TaskType.class);
    source.norms = new ArrayList<>();
    source.norms.add(new ProtocolNormTest().createModelExample(1));
    source.norms.add(new ProtocolNormTest().createModelExample(2));
    source.norms.add(new ProtocolNormTest().createModelExample(3));
    source.norms.get(1).whenever = null;
    assertCannotUpdate(target, source, "norms[1].whenever", new WeNetValidateContext("codePrefix", vertx), testContext);
  }
@ Test public void shouldNotUpdateWithABadNorm ( final Vertx vertx , final VertxTestContext testContext ) { final var target = this . createModelExample ( 1 ) ; final var source = Model . fromJsonObject ( target . toJsonObject ( ) , TaskType . class ) ; source . norms = new ArrayList < > ( ) ; source . norms . add ( new ProtocolNormTest ( ) . createModelExample ( 1 ) ) ; source . norms . add ( new ProtocolNormTest ( ) . createModelExample ( 2 ) ) ; source . norms . add ( new ProtocolNormTest ( ) . createModelExample ( 3 ) ) ; source . norms . get ( 1 ) . whenever = null ; assertCannotUpdate ( target , source , "norms[1].whenever" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ; }
Check that the model does not with bad norm.
Check that the model does not with bad norm .