Skip to content

Commit

Permalink
Use hamcrest instead of junit Assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-grecourt committed Feb 21, 2024
1 parent c47b0fc commit 1cab30f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down Expand Up @@ -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));
}
}
}
Expand Down

0 comments on commit 1cab30f

Please sign in to comment.