File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/test/java/org/springframework/samples/petclinic/rest/controller Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ void testGetVetSuccess() throws Exception {
106106 @ Test
107107 @ WithMockUser (roles ="VET_ADMIN" )
108108 void testGetVetNotFound () throws Exception {
109- given (this .clinicService .findVetById (- 1 )).willReturn (null );
109+ given (this .clinicService .findVetById (999 )).willReturn (null );
110110 this .mockMvc .perform (get ("/api/vets/999" )
111111 .accept (MediaType .APPLICATION_JSON ))
112112 .andExpect (status ().isNotFound ());
@@ -213,7 +213,7 @@ void testDeleteVetError() throws Exception {
213213 Vet newVet = vets .get (0 );
214214 ObjectMapper mapper = new ObjectMapper ();
215215 String newVetAsJSON = mapper .writeValueAsString (vetMapper .toVetDto (newVet ));
216- given (this .clinicService .findVetById (- 1 )).willReturn (null );
216+ given (this .clinicService .findVetById (999 )).willReturn (null );
217217 this .mockMvc .perform (delete ("/api/vets/999" )
218218 .content (newVetAsJSON ).accept (MediaType .APPLICATION_JSON_VALUE ).contentType (MediaType .APPLICATION_JSON_VALUE ))
219219 .andExpect (status ().isNotFound ());
You can’t perform that action at this time.
0 commit comments