Interface OpenApiFT


@ActiveProfiles("test") @SpringBootTest(webEnvironment=RANDOM_PORT) public interface OpenApiFT
The interface for openapi functional tests.

Example:

To create a concrete test class that inherits from OpenApiFT, follow these steps:

Implements the OpenApiFT class:

 public class YourFT implements OpenApiFT {

     @LocalServerPort
     private int port;

     @Override
     public int getPort() {

         return port;
     }
 }
 
Since:
0.1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The base URI use by the server in this test.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    The base path to get the documentation generated by openapi.
    int
    The port use by the server in this test.
    default void
    The setUp function call before every test.
    default void
     
  • Field Details

  • Method Details

    • getPort

      int getPort()
      The port use by the server in this test.
      Returns:
      The local port.
    • setUp

      @BeforeEach default void setUp()
      The setUp function call before every test.
    • getBasePath

      default String getBasePath()
      The base path to get the documentation generated by openapi.
      Returns:
      The base path to get the documentation.
    • testDocumentation

      @Test @DisplayName("GIVEN a openapi configuration, WHEN create documentation, THEN the controller should use the configuration and create documentation") default void testDocumentation()