components/src/test/java/eu/internetofus/common/components/models/IncentiveTest.java
/**
   * Check that is valid with spaces on icentive an issuer.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see Incentive#validate(WeNetValidateContext)
   */
Check that is valid with spaces on icentive an issuer.
@param vertx       event bus to use.
@param testContext context to test.


Check that is valid with spaces on icentive an issuer . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldBeValidAnsTrimFields(final Vertx vertx, final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext).onSuccess(model -> {
      final var expectedIcentiveType = model.IncentiveType;
      model.IncentiveType = " " + model.IncentiveType + "  ";
      final var expectedIssuer = model.Issuer;
      model.Issuer = "    " + model.Issuer + "     ";
      assertIsValid(model, new WeNetValidateContext("codePrefix", vertx), testContext, () -> testContext.verify(() -> {
        assertThat(model.IncentiveType).isEqualTo(expectedIcentiveType);
        assertThat(model.Issuer).isEqualTo(expectedIssuer);
      }));
    });
  }
@ Test public void shouldBeValidAnsTrimFields ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onSuccess ( model -> { final var expectedIcentiveType = model . IncentiveType ; model . IncentiveType = " " + model . IncentiveType + "  " ; final var expectedIssuer = model . Issuer ; model . Issuer = "    " + model . Issuer + "     " ; assertIsValid ( model , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext , ( ) -> testContext . verify ( ( ) -> { assertThat ( model . IncentiveType ) . isEqualTo ( expectedIcentiveType ) ; assertThat ( model . Issuer ) . isEqualTo ( expectedIssuer ) ; } ) ) ; } ) ; }
Check that is valid with spaces on icentive an issuer.
Check that is valid with spaces on icentive an issuer .