Package io.micronaut.http.tck
Class TestScenario
java.lang.Object
io.micronaut.http.tck.TestScenario
Defines a HTTP Server Test Scenario.
- Since:
- 3.8.0
- Author:
- Sergio del Amo
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
asserts
(String specName, HttpRequest<?> request, BiConsumer<ServerUnderTest, HttpRequest<?>> assertion) static void
asserts
(String specName, Map<String, Object> configuration, HttpRequest<?> request, BiConsumer<ServerUnderTest, HttpRequest<?>> assertion) static void
asserts
(String specName, Map<String, Object> configuration, RequestSupplier request, BiConsumer<ServerUnderTest, HttpRequest<?>> assertion) static TestScenario.Builder
builder()
-
Method Details
-
asserts
public static void asserts(String specName, Map<String, Object> configuration, HttpRequest<?> request, BiConsumer<ServerUnderTest, throws IOExceptionHttpRequest<?>> assertion) - Parameters:
specName
- Value for spec.name property. Used to avoid bean pollution.configuration
- Test Scenario configurationrequest
- HTTP Request to be sent in the test scenarioassertion
- Assertion for a request and server.- Throws:
IOException
- Exception thrown while getting the server under test.
-
asserts
public static void asserts(String specName, Map<String, Object> configuration, RequestSupplier request, BiConsumer<ServerUnderTest, throws IOExceptionHttpRequest<?>> assertion) - Parameters:
specName
- Value for spec.name property. Used to avoid bean pollution.configuration
- Test Scenario configurationrequest
- HTTP Request to be sent in the test scenarioassertion
- Assertion for a request and server.- Throws:
IOException
- Exception thrown while getting the server under test.
-
asserts
public static void asserts(String specName, HttpRequest<?> request, BiConsumer<ServerUnderTest, HttpRequest<?>> assertion) throws IOException- Parameters:
specName
- Value for spec.name property. Used to avoid bean pollution.request
- HTTP Request to be sent in the test scenarioassertion
- Assertion for a request and server.- Throws:
IOException
- Exception thrown while getting the server under test.
-
builder
- Returns:
- A Test Scenario builder.
-