Ar
Size: a a a
Ar
NB
Ar
DS
LM
N

NB
S🕶
@GetMapping
public List<MovieDto> getAllMovies(
MovieRequest movieRequest,
@PageableDefault(size = Integer.MAX_VALUE, sort = "id", direction = Sort.Direction.DESC) Pageable pageable
) {
return new ArrayList<>();
}
S🕶
MockHttpServletRequest:
HTTP Method = GET
Request URI = /movies
Parameters = {movie=[regular], rental=[ongoing]}
Headers = [Content-Type:"application/json"]
Body = <no character encoding set>
Session Attrs = {}
S🕶
MovieRequest movieRequest - и вот такое не пойму как протестировать:@GetMapping
public List<MovieDto> getAllMovies(
@RequestParam("movie") String movie,
@RequestParam("rental") String rentalz
) {
NB
MovieRequest movieRequest - и вот такое не пойму как протестировать:@GetMapping
public List<MovieDto> getAllMovies(
@RequestParam("movie") String movie,
@RequestParam("rental") String rentalz
) {
S🕶
S🕶
S🕶
@GetMapping
public List<MovieDto> getAllMovies(
MovieRequest movieRequest,
@PageableDefault(size = Integer.MAX_VALUE, sort = "id", direction = Sort.Direction.DESC) Pageable pageable
) {
equest ничегоNB
@GetMapping
public List<MovieDto> getAllMovies(
MovieRequest movieRequest,
@PageableDefault(size = Integer.MAX_VALUE, sort = "id", direction = Sort.Direction.DESC) Pageable pageable
) {
equest ничегоS🕶
this.mockMvc.perform(
get("/movies")
.contentType(MediaType.APPLICATION_JSON)
.param("movie", "regular")
.param("rental", "ongoing")
.param("page", "0")
.param("size", "10")
.param("sort", "id,desc")
)
S🕶
S🕶
NB
User user = new User("login", "password", "email@gmail.com", userRole);
user.setPasswordConfirmation("password");
mockMvc.perform(post(SLASH.concat(ADD_USER))
.flashAttr(USER_BEAN_ATTRIBUTE, user))
.andExpect(status().isFound())
.andExpect(redirectedUrl(SLASH.concat(HOME)));