Skip to content

Commit ebcb197

Browse files
authored
Use Hamcrest assertions instead of JUnit in microprofile/messaging/core (helidon-io#1749) (helidon-io#5043)
1 parent a87bcfd commit ebcb197

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

microprofile/messaging/core/src/test/java/io/helidon/microprofile/messaging/EmitterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
import static org.hamcrest.MatcherAssert.assertThat;
3939
import static org.hamcrest.Matchers.contains;
40-
import static org.junit.jupiter.api.Assertions.assertTrue;
40+
import static org.hamcrest.CoreMatchers.is;
4141

4242
import jakarta.inject.Inject;
4343

@@ -69,7 +69,7 @@ void name() throws InterruptedException {
6969
emitter.send("Test2");
7070
emitter.send(Message.of("Test3"));
7171
emitter.complete();
72-
assertTrue(countDownLatch.await(10, TimeUnit.SECONDS));
72+
assertThat(countDownLatch.await(10, TimeUnit.SECONDS), is(true));
7373
assertThat(payloads, contains("Test1", "Test2", "Test3"));
7474
}
7575
}

microprofile/messaging/core/src/test/java/io/helidon/microprofile/messaging/connector/Processor2ConnectorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
import static org.hamcrest.MatcherAssert.assertThat;
5656
import static org.hamcrest.Matchers.contains;
57-
import static org.junit.jupiter.api.Assertions.assertEquals;
57+
import static org.hamcrest.Matchers.hasSize;
5858
import static org.junit.jupiter.api.Assertions.fail;
5959

6060
@HelidonTest
@@ -89,7 +89,7 @@ private void connector2proc2connectorTest(String channelPostfix) {
8989
emitter.emit(Message.of("test2"));
9090
emitter.complete();
9191
connector.awaitComplete("to-connector-" + channelPostfix);
92-
assertEquals(4, resultList.size());
92+
assertThat(resultList, hasSize(4));
9393
assertThat(resultList.stream()
9494
.map(Message::getPayload)
9595
.collect(Collectors.toList()),

0 commit comments

Comments
 (0)