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 Details
-
BASE_URI
The base URI use by the server in this test.- See Also:
-
-
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
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()
-