From dc9b747313b016f594956d3a40a70ae2bc55cad0 Mon Sep 17 00:00:00 2001 From: theia Date: Tue, 2 Jun 2020 19:58:16 +0800 Subject: [PATCH 1/2] test --- .../test/java/com/example/SampleApplicationMvcTests.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationMvcTests.java b/spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationMvcTests.java index a6f802e23..793edfeb0 100644 --- a/spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationMvcTests.java +++ b/spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationMvcTests.java @@ -51,4 +51,13 @@ public void words() throws Exception { .isEqualTo("[{\"value\":\"foo\"},{\"value\":\"bar\"}]"); } + @Test + public void wordsUpperCase() throws Exception { + ResponseEntity result = this.rest + .exchange(RequestEntity.get(new URI("/words/upperCase")) + .accept(MediaType.APPLICATION_JSON).build(), String.class); + assertThat(result.getBody()) + .isEqualTo("[{\"value\":\"FOO\"},{\"value\":\"BAR\"}]"); + } + } From 6e62189dd7f4ae38021b69dcdcd0bea4270c28e1 Mon Sep 17 00:00:00 2001 From: theia Date: Tue, 2 Jun 2020 20:06:03 +0800 Subject: [PATCH 2/2] test2 --- .../src/test/java/com/example/SampleApplicationMvcTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationMvcTests.java b/spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationMvcTests.java index 793edfeb0..dd19815b3 100644 --- a/spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationMvcTests.java +++ b/spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationMvcTests.java @@ -54,7 +54,7 @@ public void words() throws Exception { @Test public void wordsUpperCase() throws Exception { ResponseEntity result = this.rest - .exchange(RequestEntity.get(new URI("/words/upperCase")) + .exchange(RequestEntity.get(new URI("/words|upperCase")) .accept(MediaType.APPLICATION_JSON).build(), String.class); assertThat(result.getBody()) .isEqualTo("[{\"value\":\"FOO\"},{\"value\":\"BAR\"}]");