|
1 | 1 | package com.baeldung.controllers; |
2 | 2 |
|
3 | | -import com.baeldung.sampleapp.config.MainApplication; |
4 | | -import com.baeldung.services.ExampleService; |
5 | | -import com.baeldung.transfer.LoginForm; |
| 3 | +import static org.mockito.Mockito.when; |
| 4 | +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; |
| 5 | +import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; |
| 6 | +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; |
| 7 | +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; |
| 8 | + |
6 | 9 | import org.junit.Before; |
7 | 10 | import org.junit.Test; |
8 | 11 | import org.junit.runner.RunWith; |
|
11 | 14 | import org.mockito.MockitoAnnotations; |
12 | 15 | import org.springframework.boot.test.context.SpringBootTest; |
13 | 16 | import org.springframework.test.context.junit4.SpringRunner; |
14 | | - |
15 | 17 | import org.springframework.test.web.servlet.MockMvc; |
16 | 18 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; |
17 | 19 |
|
18 | | -import static org.mockito.Mockito.when; |
19 | | -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; |
20 | | -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; |
21 | | -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; |
22 | | -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; |
| 20 | +import com.baeldung.SpringBootRestApplication; |
| 21 | +import com.baeldung.services.ExampleService; |
| 22 | +import com.baeldung.transfer.LoginForm; |
| 23 | +import com.baeldung.web.controller.ExamplePostController; |
23 | 24 |
|
24 | 25 | @RunWith(SpringRunner.class) |
25 | | -@SpringBootTest(classes = MainApplication.class) |
| 26 | +@SpringBootTest(classes = SpringBootRestApplication.class) |
26 | 27 | public class ExamplePostControllerResponseIntegrationTest { |
27 | 28 |
|
28 | 29 | MockMvc mockMvc; |
|
0 commit comments