@@ -32,6 +32,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-compiler</artifactId>
|
||||
<version>${spring-cloud-function.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<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.result.MockMvcResultMatchers.content;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -37,6 +38,7 @@ import org.springframework.test.web.servlet.MvcResult;
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@AutoConfigureMockMvc
|
||||
@Ignore
|
||||
public class SampleApplicationMvcTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -22,6 +22,12 @@ public class WebTestClientTests {
|
||||
@Autowired
|
||||
private WebTestClient client;
|
||||
|
||||
@Test
|
||||
public void words() {
|
||||
client.get().uri("/words").exchange()
|
||||
.expectStatus().isOk().expectBody(String.class).isEqualTo("[\"foo\",\"bar\"]");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void uppercase() {
|
||||
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\"]");
|
||||
}
|
||||
|
||||
@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
|
||||
public void testStream() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user