dies ist mein Controller:JUnit-Test-Controller Fehler
@RestController
@RequestMapping(value = Constants.COMPANY, produces = MediaType.APPLICATION_JSON_VALUE)
public class CompanyController {
@Autowired
private CompanyService companyService;
@RequestMapping(method = RequestMethod.GET)
public ResponseEntity find(@ModelAttribute CompanyDto request, @Valid @ModelAttribute PageableRequestModel pageRequest) {
final Page<CompanyDto> dtoPg = companyService.find(request, pageRequest.getPageable());
return new ResponseEntity(PagedResponseDto.of(dtoPg), HttpStatus.OK);
}
}
dies ist mein Controller-Test:
@Test
public void testListAll() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.get(COMPANY))
.andExpect(MockMvcResultMatchers.status().isOk());
}
warum Fehler 'verschachtelte Ausnahme ist java.lang.IllegalArgumentException: Seite erforderlich' ?? help me
Wie haben Sie Ihren Test eingerichtet? Wie ist die Konfiguration? Könntest du bitte auch den kompletten Stacktrace posten? – hotzst