e16b8ec7849dff2cfd695311d24b9d726f83648a
[demos/spring-boot] / src / test / java / de / juplo / demo / DemoApplicationTests.java
1 package de.juplo.demo;
2
3 import org.junit.jupiter.api.Test;
4 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient;
6 import org.springframework.boot.test.context.SpringBootTest;
7 import org.springframework.test.web.reactive.server.WebTestClient;
8
9
10 @SpringBootTest
11 @AutoConfigureWebTestClient
12 class DemoApplicationTests {
13
14         @Test
15         void contextLoads() {
16         }
17
18
19         @Test
20         void getWelcomeResponseIsOk(@Autowired WebTestClient webClient) {
21                 webClient
22                                 .get().uri("/")
23                                 .exchange()
24                                 .expectStatus().isOk();
25         }
26 }