Package io.micronaut.http.tck
Class AssertionUtils
java.lang.Object
io.micronaut.http.tck.AssertionUtils
Utility class used to perform assertions.
- Since:
- 3.8.0
- Author:
- Sergio del Amo
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
assertDoesNotThrow
(@NonNull ServerUnderTest server, @NonNull HttpRequest<T> request, @NonNull HttpStatus expectedStatus, @Nullable String expectedBody, @Nullable Map<String, String> expectedHeaders) static <T> void
assertDoesNotThrow
(@NonNull ServerUnderTest server, @NonNull HttpRequest<T> request, @NonNull HttpResponseAssertion assertion) static void
assertThrows
(@NonNull ServerUnderTest server, @NonNull HttpRequest<?> request, @NonNull HttpStatus expectedStatus, @Nullable String expectedBody, @Nullable Map<String, String> expectedHeaders) static void
assertThrows
(@NonNull ServerUnderTest server, @NonNull HttpRequest<?> request, @NonNull HttpResponseAssertion assertion) static BiConsumer<ServerUnderTest,
HttpRequest<?>> assertThrowsStatus
(@NonNull HttpStatus status)
-
Method Details
-
assertThrowsStatus
public static BiConsumer<ServerUnderTest,HttpRequest<?>> assertThrowsStatus(@NonNull @NonNull HttpStatus status) -
assertThrows
public static void assertThrows(@NonNull @NonNull ServerUnderTest server, @NonNull @NonNull HttpRequest<?> request, @NonNull @NonNull HttpResponseAssertion assertion) -
assertThrows
-
assertDoesNotThrow
-
assertDoesNotThrow
public static <T> void assertDoesNotThrow(@NonNull @NonNull ServerUnderTest server, @NonNull @NonNull HttpRequest<T> request, @NonNull @NonNull HttpResponseAssertion assertion)
-