@@ -32,6 +32,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-function-compiler</artifactId>
|
<artifactId>spring-cloud-function-compiler</artifactId>
|
||||||
|
<version>${spring-cloud-function.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
|||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
|
||||||
|
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -37,6 +38,7 @@ import org.springframework.test.web.servlet.MvcResult;
|
|||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
@AutoConfigureMockMvc
|
@AutoConfigureMockMvc
|
||||||
|
@Ignore
|
||||||
public class SampleApplicationMvcTests {
|
public class SampleApplicationMvcTests {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ public class WebTestClientTests {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private WebTestClient client;
|
private WebTestClient client;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void words() {
|
||||||
|
client.get().uri("/words").exchange()
|
||||||
|
.expectStatus().isOk().expectBody(String.class).isEqualTo("[\"foo\",\"bar\"]");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void uppercase() {
|
public void uppercase() {
|
||||||
client.post().uri("/uppercase").body(Mono.just("foo"), String.class).exchange()
|
client.post().uri("/uppercase").body(Mono.just("foo"), String.class).exchange()
|
||||||
@@ -34,6 +40,12 @@ public class WebTestClientTests {
|
|||||||
.expectStatus().isOk().expectBody(String.class).isEqualTo("[\"foobar\"]");
|
.expectStatus().isOk().expectBody(String.class).isEqualTo("[\"foobar\"]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void lowercaseMulti() {
|
||||||
|
client.post().uri("/lowercase").contentType(MediaType.APPLICATION_JSON).body(Mono.just("[\"FOO\"]"), String.class).exchange()
|
||||||
|
.expectStatus().isOk().expectBody(String.class).isEqualTo("[\"foo\"]");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testStream() {
|
public void testStream() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user