components/src/test/java/eu/internetofus/common/components/models/MaterialTest.java
/**
   * Check that cannot merge a material with a bad quantity.
   *
   * @param quantity    that is invalid.
   * @param vertx       event bus to use.
   * @param testContext test context to use.
   */
Check that cannot merge a material with a bad quantity.
@param quantity    that is invalid.
@param vertx       event bus to use.
@param testContext test context to use.
Check that cannot merge a material with a bad quantity . @param quantity that is invalid . @param vertx event bus to use . @param testContext test context to use .
@ParameterizedTest(name = "Should not be merged with the quantity {0}")
  @ValueSource(ints = { -1, 0 })
  public void shouldCannotMergeWithABadQuantity(final Integer quantity, final Vertx vertx,
      final VertxTestContext testContext) {
    final var source = new Material();
    source.quantity = quantity;
    final var target = this.createModelExample(1);
    assertCannotMerge(target, source, "quantity", new WeNetValidateContext("codePrefix", vertx), testContext);
  }
@ ParameterizedTest ( name = "Should not be merged with the quantity {0}" ) @ ValueSource ( ints = { - 1 , 0 } ) public void shouldCannotMergeWithABadQuantity ( final Integer quantity , final Vertx vertx , final VertxTestContext testContext ) { final var source = new Material ( ) ; source . quantity = quantity ; final var target = this . createModelExample ( 1 ) ; assertCannotMerge ( target , source , "quantity" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ; }
Check that cannot merge a material with a bad quantity.
Check that cannot merge a material with a bad quantity .