Skip to content

Commit 4f0a147

Browse files
committed
test
1 parent 7061f4c commit 4f0a147

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

http-client/src/test/java/io/avaje/http/client/HelloControllerTest.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class HelloControllerTest extends BaseWebTest {
3131
private static final ObjectMapper objectMapper = new ObjectMapper();
3232

3333
final HttpClientContext clientContext = client();
34+
35+
String nullString = null;
3436

3537
@Test
3638
void newClientTest() {
@@ -801,7 +803,7 @@ void async_list_as() throws ExecutionException, InterruptedException {
801803
void get_withPathParamAndQueryParam_returningBean() {
802804

803805
final HelloDto dto = clientContext.request()
804-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
806+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", nullString)
805807
.GET()
806808
.bean(HelloDto.class);
807809

@@ -813,7 +815,7 @@ void get_withPathParamAndQueryParam_returningBean() {
813815
@Test
814816
void callBean() {
815817
final HelloDto dto = clientContext.request()
816-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
818+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", (String) null)
817819
.GET()
818820
.call().bean(HelloDto.class).execute();
819821

@@ -825,7 +827,7 @@ void callBean() {
825827
@Test
826828
void callBeanAsync() throws ExecutionException, InterruptedException {
827829
final CompletableFuture<HelloDto> future = clientContext.request()
828-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
830+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", (String) null)
829831
.GET()
830832
.call().bean(HelloDto.class).async();
831833

@@ -842,7 +844,7 @@ void async_whenComplete_returningBean() throws ExecutionException, InterruptedEx
842844
final AtomicReference<HelloDto> ref = new AtomicReference<>();
843845

844846
final CompletableFuture<HelloDto> future = clientContext.request()
845-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
847+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", nullString)
846848
.GET()
847849
.async().bean(HelloDto.class);
848850

@@ -872,7 +874,7 @@ void async_whenComplete_returningBeanWithHeaders() throws ExecutionException, In
872874
final AtomicReference<HttpResponse<HelloDto>> ref = new AtomicReference<>();
873875

874876
final CompletableFuture<HttpResponse<HelloDto>> future = clientContext.request()
875-
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", null)
877+
.path("hello/43/2020-03-05").queryParam("otherParam", "other").queryParam("foo", nullString)
876878
.GET()
877879
.async().as(HelloDto.class);
878880

0 commit comments

Comments
 (0)