components/src/test/java/eu/internetofus/common/components/models/SocialPracticeTest.java
/**
   * Check that not accept model with bad norms.
   *
   * @param vertx       event bus to use.
   * @param testContext test context to use.
   *
   * @see SocialPractice#validate(WeNetValidateContext)
   */
Check that not accept model with bad norms.
@param vertx       event bus to use.
@param testContext test context to use.


Check that not accept model with bad norms . @param vertx event bus to use . @param testContext test context to use .
@Test
  public void shouldNotBeValidWithABadNorms(final Vertx vertx, final VertxTestContext testContext) {
    final var model = new SocialPractice();
    model.norms = new ArrayList<>();
    model.norms.add(new ProtocolNormTest().createModelExample(1));
    model.norms.add(new ProtocolNormTest().createModelExample(2));
    model.norms.add(new ProtocolNormTest().createModelExample(3));
    model.norms.get(1).whenever = model.norms.get(1).thenceforth;
    assertIsNotValid(model, "norms[1].thenceforth", new WeNetValidateContext("codePrefix", vertx), testContext);
  }
@ Test public void shouldNotBeValidWithABadNorms ( final Vertx vertx , final VertxTestContext testContext ) { final var model = new SocialPractice ( ) ; model . norms = new ArrayList < > ( ) ; model . norms . add ( new ProtocolNormTest ( ) . createModelExample ( 1 ) ) ; model . norms . add ( new ProtocolNormTest ( ) . createModelExample ( 2 ) ) ; model . norms . add ( new ProtocolNormTest ( ) . createModelExample ( 3 ) ) ; model . norms . get ( 1 ) . whenever = model . norms . get ( 1 ) . thenceforth ; assertIsNotValid ( model , "norms[1].thenceforth" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ; }
Check that not accept model with bad norms.
Check that not accept model with bad norms .