components/src/test/java/eu/internetofus/common/components/models/RoutineTest.java
/**
   * Check that can not merge with a bad label distribution scored label.
   *
   * @param vertx       event bus to use.
   * @param testContext test context to use.
   *
   * @see Routine#merge(Routine, WeNetValidateContext)
   */
Check that can not merge with a bad label distribution scored label.
@param vertx       event bus to use.
@param testContext test context to use.


Check that can not merge with a bad label distribution scored label . @param vertx event bus to use . @param testContext test context to use .
@Test
  public void shouldNotMergeWithBadLabelDistibutionScoredLabel(final Vertx vertx, final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext).onSuccess(target -> {
      final var source = new Routine();
      source.label_distribution = new JsonObject().put("bad_scored_label",
          new JsonArray().add(new ScoredLabelTest().createModelExample(1).toJsonObject().putNull("label")));
      assertCannotMerge(target, source, "label_distribution.bad_scored_label[0].label",
          new WeNetValidateContext("codePrefix", vertx), testContext);
    });
  }
@ Test public void shouldNotMergeWithBadLabelDistibutionScoredLabel ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onSuccess ( target -> { final var source = new Routine ( ) ; source . label_distribution = new JsonObject ( ) . put ( "bad_scored_label" , new JsonArray ( ) . add ( new ScoredLabelTest ( ) . createModelExample ( 1 ) . toJsonObject ( ) . putNull ( "label" ) ) ) ; assertCannotMerge ( target , source , "label_distribution.bad_scored_label[0].label" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ; } ) ; }
Check that can not merge with a bad label distribution scored label.
Check that can not merge with a bad label distribution scored label .