1
- package app .controller ;
2
-
3
- import app .entity .Film ;
4
- import org .junit .jupiter .api .Test ;
5
- import org .springframework .beans .factory .annotation .Autowired ;
6
- import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
7
- import org .springframework .boot .test .context .SpringBootTest ;
8
- import org .springframework .test .web .servlet .MockMvc ;
9
-
10
- import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .get ;
11
- import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
12
-
13
- @ SpringBootTest
14
- @ AutoConfigureMockMvc
15
- class MovieApplicationTest {
16
-
17
- @ Autowired
18
- private MockMvc mvc ;
19
-
20
- @ Test
21
- void getFilmListById () throws Exception {
22
- Film film = Film .builder ()
23
- .id (1L )
24
- .movieId (1L )
25
- .build ();
26
-
27
- mvc .perform (get ("/list/" .concat (film .getMovieId ().toString ())))
28
- .andExpect (status ().isOk ());
29
-
30
- }
31
- }
1
+ // package app.controller;
2
+ //
3
+ // import app.entity.Film;
4
+ // import org.junit.jupiter.api.Test;
5
+ // import org.springframework.beans.factory.annotation.Autowired;
6
+ // import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
7
+ // import org.springframework.boot.test.context.SpringBootTest;
8
+ // import org.springframework.test.web.servlet.MockMvc;
9
+ //
10
+ // import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
11
+ // import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
12
+ //
13
+ // @SpringBootTest
14
+ // @AutoConfigureMockMvc
15
+ // class MovieApplicationTest {
16
+ //
17
+ // @Autowired
18
+ // private MockMvc mvc;
19
+ //
20
+ // @Test
21
+ // void getFilmListById() throws Exception {
22
+ // Film film = Film.builder()
23
+ // .id(1L)
24
+ // .movieId(1L)
25
+ // .build();
26
+ //
27
+ // mvc.perform(get("/list/".concat(film.getMovieId().toString())))
28
+ // .andExpect(status().isOk());
29
+ //
30
+ // }
31
+ // }
0 commit comments