dummy/src/test/java/eu/internetofus/wenet_dummy/api/dummies/DummiesIT.java
/**
   * Should post dummy model.
   *
   * @param vertx       that contains the event bus to use.
   * @param client      to use.
   * @param testContext context over the tests.
   */
Should post dummy model.
@param vertx       that contains the event bus to use.
@param client      to use.
@param testContext context over the tests.
Should post dummy model . @param vertx that contains the event bus to use . @param client to use . @param testContext context over the tests .
@Test
  public void shouldPostDummy(Vertx vertx, final WebClient client, final VertxTestContext testContext) {
    final var model = new DummyTest().createModelExample(1);
    model.id = null;
    testRequest(client, HttpMethod.POST, Dummies.PATH).expect(res -> {
      assertThat(res.statusCode()).isEqualTo(Status.CREATED.getStatusCode());
      final var posted = assertThatBodyIs(Dummy.class, res);
      assertThat(posted).isNotNull().isNotEqualTo(model);
      model.id = posted.id;
      assertThat(posted).isEqualTo(model);
    }).sendJson(model, testContext);
  }
@ Test public void shouldPostDummy ( Vertx vertx , final WebClient client , final VertxTestContext testContext ) { final var model = new DummyTest ( ) . createModelExample ( 1 ) ; model . id = null ; testRequest ( client , HttpMethod . POST , Dummies . PATH ) . expect ( res -> { assertThat ( res . statusCode ( ) ) . isEqualTo ( Status . CREATED . getStatusCode ( ) ) ; final var posted = assertThatBodyIs ( Dummy . class , res ) ; assertThat ( posted ) . isNotNull ( ) . isNotEqualTo ( model ) ; model . id = posted . id ; assertThat ( posted ) . isEqualTo ( model ) ; } ) . sendJson ( model , testContext ) ; }
Should post dummy model.
Should post dummy model .