vertx/src/test/java/eu/internetofus/common/vertx/AbstractModelResourcesIT.java
/**
   * Should delete a model.
   *
   * @param vertx       event bus to use.
   * @param client      to connect to the server.
   * @param testContext context to test.
   */
Should delete a model.
@param vertx       event bus to use.
@param client      to connect to the server.
@param testContext context to test.
Should delete a model . @param vertx event bus to use . @param client to connect to the server . @param testContext context to test .
@Test
  public void shouldDeleteModel(final Vertx vertx, final WebClient client, final VertxTestContext testContext) {
    testContext.assertComplete(this.createValidModelExample(1, vertx, testContext)).onSuccess(source -> {
      testContext.assertComplete(this.storeModel(source, vertx, testContext)).onSuccess(stored -> {
        testRequest(client, HttpMethod.DELETE, this.modelPath() + "/" + this.idOf(stored)).expect(res -> {
          assertThat(res.statusCode()).isEqualTo(Status.NO_CONTENT.getStatusCode());
        }).send(testContext);
      });
    });
  }
@ Test public void shouldDeleteModel ( final Vertx vertx , final WebClient client , final VertxTestContext testContext ) { testContext . assertComplete ( this . createValidModelExample ( 1 , vertx , testContext ) ) . onSuccess ( source -> { testContext . assertComplete ( this . storeModel ( source , vertx , testContext ) ) . onSuccess ( stored -> { testRequest ( client , HttpMethod . DELETE , this . modelPath ( ) + "/" + this . idOf ( stored ) ) . expect ( res -> { assertThat ( res . statusCode ( ) ) . isEqualTo ( Status . NO_CONTENT . getStatusCode ( ) ) ; } ) . send ( testContext ) ; } ) ; } ) ; }
Should delete a model.
Should delete a model .