From cbc07cc70be90eb978dd26a06c169ad5d758127e Mon Sep 17 00:00:00 2001 From: Andrei Arlou Date: Wed, 5 Oct 2022 17:36:21 +0300 Subject: [PATCH] Use Hamcrest assertions instead of JUnit in microprofile/websocket - backport 2.x (#1749) --- .../java/io/helidon/microprofile/tyrus/EchoClient.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/microprofile/websocket/src/test/java/io/helidon/microprofile/tyrus/EchoClient.java b/microprofile/websocket/src/test/java/io/helidon/microprofile/tyrus/EchoClient.java index 17af693b918..f75f86e40dc 100644 --- a/microprofile/websocket/src/test/java/io/helidon/microprofile/tyrus/EchoClient.java +++ b/microprofile/websocket/src/test/java/io/helidon/microprofile/tyrus/EchoClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. + * Copyright (c) 2020, 2022 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,8 @@ import org.glassfish.tyrus.client.ClientManager; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.fail; /** @@ -90,7 +91,7 @@ public void onMessage(String message) { LOGGER.info("Client OnMessage called '" + message + "'"); int index = messages.length - (int) messageLatch.getCount(); - assertTrue(equals.apply(messages[index], message)); + assertThat(messages[index] +":"+message, equals.apply(messages[index], message), is(true)); messageLatch.countDown(); if (messageLatch.getCount() == 0) {