From 1cab30fa9436547a4814dbf85f96e9d4b02cabb7 Mon Sep 17 00:00:00 2001 From: Romain Grecourt Date: Wed, 21 Feb 2024 14:51:11 -0800 Subject: [PATCH] Use hamcrest instead of junit Assertions --- .../java/io/helidon/jersey/connector/MultipartTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jersey/connector/src/test/java/io/helidon/jersey/connector/MultipartTest.java b/jersey/connector/src/test/java/io/helidon/jersey/connector/MultipartTest.java index ca4f5f21675..198eb3dc946 100644 --- a/jersey/connector/src/test/java/io/helidon/jersey/connector/MultipartTest.java +++ b/jersey/connector/src/test/java/io/helidon/jersey/connector/MultipartTest.java @@ -28,7 +28,6 @@ import org.glassfish.jersey.media.multipart.MultiPart; import org.glassfish.jersey.media.multipart.MultiPartFeature; import org.glassfish.jersey.message.internal.ReaderWriter; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; @@ -49,6 +48,9 @@ import java.util.HashSet; import java.util.Set; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + @HelidonTest @DisableDiscovery @AddExtension(ServerCdiExtension.class) @@ -95,8 +97,8 @@ void testMultipart(HelidonEntity.HelidonEntityType entityType, WebTarget webTarg .register(MultiPartFeature.class) .request() .post(Entity.entity(multipart, multipart.getMediaType()))) { - Assertions.assertEquals(Response.Status.OK.getStatusCode(), r.getStatus()); - Assertions.assertEquals(ENTITY, r.readEntity(String.class)); + assertThat(r.getStatus(), is(Response.Status.OK.getStatusCode())); + assertThat(r.readEntity(String.class), is(ENTITY)); } } }