Skip to content

Commit a5a78ea

Browse files
authored
Use Hamcrest assertions instead of JUnit in examples/webserver/jersey (helidon-io#1749) (helidon-io#5156)
1 parent 19a7cf3 commit a5a78ea

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • examples/webserver/jersey/src/test/java/io/helidon/webserver/examples/jersey

examples/webserver/jersey/src/test/java/io/helidon/webserver/examples/jersey/HelloWorldTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2021 Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2022 Oracle and/or its affiliates.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,8 @@
2727
import org.junit.jupiter.api.BeforeAll;
2828
import org.junit.jupiter.api.Test;
2929

30-
import static org.junit.jupiter.api.Assertions.assertEquals;
30+
import static org.hamcrest.CoreMatchers.is;
31+
import static org.hamcrest.MatcherAssert.assertThat;
3132

3233
/**
3334
* The Jersey Client based example that tests the {@link HelloWorld} resource
@@ -63,8 +64,8 @@ public void testHelloWorld() throws Exception {
6364
.path("jersey/hello")
6465
.request()
6566
.get()) {
66-
assertEquals("Hello World!", response.readEntity(String.class),
67-
"Unexpected response; status: " + response.getStatus());
67+
assertThat("Unexpected response; status: " + response.getStatus(),
68+
response.readEntity(String.class), is("Hello World!"));
6869
} finally {
6970
client.close();
7071
}

0 commit comments

Comments
 (0)