11/*
2- * Copyright (c) 2020, 2021 Oracle and/or its affiliates.
2+ * Copyright (c) 2020, 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.
2828import jakarta .json .Json ;
2929import jakarta .json .JsonBuilderFactory ;
3030import jakarta .json .JsonObject ;
31- import org .junit .jupiter .api .Assertions ;
3231import org .junit .jupiter .api .Test ;
3332
3433import static org .hamcrest .CoreMatchers .is ;
@@ -59,7 +58,7 @@ public class RequestTest extends TestParent {
5958 public void testHelloWorld () throws ExecutionException , InterruptedException {
6059 webClient .get ()
6160 .request (JsonObject .class )
62- .thenAccept (jsonObject -> Assertions . assertEquals ( "Hello World!" , jsonObject . getString ( "message " )))
61+ .thenAccept (jsonObject -> assertThat ( jsonObject . getString ( "message" ), is ( "Hello World! " )))
6362 .toCompletableFuture ()
6463 .get ();
6564 }
@@ -84,7 +83,7 @@ public void testFollowRedirect() throws ExecutionException, InterruptedException
8483 webClient .get ()
8584 .path ("/redirect" )
8685 .request (JsonObject .class )
87- .thenAccept (jsonObject -> Assertions . assertEquals ( "Hello World!" , jsonObject . getString ( "message " )))
86+ .thenAccept (jsonObject -> assertThat ( jsonObject . getString ( "message" ), is ( "Hello World! " )))
8887 .toCompletableFuture ()
8988 .get ();
9089
@@ -103,7 +102,7 @@ public void testFollowRedirectPath() {
103102 .path ("/redirectPath" )
104103 .request (JsonObject .class )
105104 .await ();
106- Assertions . assertEquals ( "Hello World!" , jsonObject . getString ( "message " ));
105+ assertThat ( jsonObject . getString ( "message" ), is ( "Hello World! " ));
107106 }
108107
109108 @ Test
@@ -132,10 +131,10 @@ public void testPut() throws Exception {
132131 webClient .put ()
133132 .path ("/greeting" )
134133 .submit (JSON_NEW_GREETING )
135- .thenAccept (response -> Assertions . assertEquals ( 204 , response .status ().code ()))
134+ .thenAccept (response -> assertThat ( response .status ().code (), is ( 204 )))
136135 .thenCompose (nothing -> webClient .get ()
137136 .request (JsonObject .class ))
138- .thenAccept (jsonObject -> Assertions . assertEquals ( "Hola World!" , jsonObject . getString ( "message " )))
137+ .thenAccept (jsonObject -> assertThat ( jsonObject . getString ( "message" ), is ( "Hola World! " )))
139138 .thenCompose (nothing -> webClient .put ()
140139 .path ("/greeting" )
141140 .submit (JSON_OLD_GREETING ))
0 commit comments