vertx/src/test/java/eu/internetofus/common/vertx/AbstractModelFieldResourcesIT.java
/**
   * Should not retrieve field over if the model is not defined.
   *
   * @param vertx       event bus to use.
   * @param client      to connect to the server.
   * @param testContext context to test.
   */
Should not retrieve field over if the model is not defined.
@param vertx       event bus to use.
@param client      to connect to the server.
@param testContext context to test.
Should not retrieve field over if the model is not defined . @param vertx event bus to use . @param client to connect to the server . @param testContext context to test .
@Test
  public void shouldNotRetrieveFieldOverUndefinedModel(final Vertx vertx, final WebClient client,
      final VertxTestContext testContext) {
    final var path = this.modelPath() + this.undefinedModelIdPath() + this.fieldPath();
    testRequest(client, HttpMethod.GET, path).expect(res -> {
      assertThat(res.statusCode()).isEqualTo(Status.NOT_FOUND.getStatusCode());
      final var error = assertThatBodyIs(ErrorMessage.class, res);
      assertThat(error.code).isNotEmpty();
      assertThat(error.message).isNotEmpty().isNotEqualTo(error.code);
    }).send(testContext);
  }
@ Test public void shouldNotRetrieveFieldOverUndefinedModel ( final Vertx vertx , final WebClient client , final VertxTestContext testContext ) { final var path = this . modelPath ( ) + this . undefinedModelIdPath ( ) + this . fieldPath ( ) ; testRequest ( client , HttpMethod . GET , path ) . expect ( res -> { assertThat ( res . statusCode ( ) ) . isEqualTo ( Status . NOT_FOUND . getStatusCode ( ) ) ; final var error = assertThatBodyIs ( ErrorMessage . class , res ) ; assertThat ( error . code ) . isNotEmpty ( ) ; assertThat ( error . message ) . isNotEmpty ( ) . isNotEqualTo ( error . code ) ; } ) . send ( testContext ) ; }
Should not retrieve field over if the model is not defined.
Should not retrieve field over if the model is not defined .