@@ -514,7 +514,7 @@ public void listaPaginada_erroDeServidor_retorno500() throws Exception {
514514 verifyNoMoreInteractions (service );
515515 }
516516
517- @ Test
517+ @ Test @ DisplayName ( "Returns 200 and paginated list. No Page parameters are provided." )
518518 public void listaPaginadaOrdenada_sucessoSemParâmetros_retorno200 () throws Exception {
519519 List <ClienteResponseDTO > lista = List .of (cliente1 , cliente2 );
520520 Page <ClienteResponseDTO > page = new PageImpl <>(lista );
@@ -534,14 +534,14 @@ public void listaPaginada_erroDeServidor_retorno500() throws Exception {
534534 verifyNoMoreInteractions (service );
535535 }
536536
537- @ Test
537+ @ Test @ DisplayName ( "Returns 200 and paginated list. Parameters are provided." )
538538 public void listaPaginadaOrdenada_sucessoComParâmetros_retorno200 () throws Exception {
539539 List <ClienteResponseDTO > lista = List .of (cliente1 , cliente2 );
540540 Page <ClienteResponseDTO > page = new PageImpl <>(lista );
541541
542- when (service .listaPaginadaPorOrdenacao (1 , 2 , "id" )).thenReturn (page );
542+ when (service .listaPaginadaPorOrdenacao (0 , 2 , "id" )).thenReturn (page );
543543
544- mvc .perform (get ("/paginadaordem?pagina=1 &itens=2&ordenadoPor=id" )).andExpect (status ().isOk ())
544+ mvc .perform (get ("/paginadaordem?pagina=0 &itens=2&ordenadoPor=id" )).andExpect (status ().isOk ())
545545 .andExpect (jsonPath ("$.content[0].nome" ).value ("Marcus" ))
546546 .andExpect (jsonPath ("$.content[1].nome" ).value ("Antonio" ))
547547 .andExpect (jsonPath ("$.content[0].cpf" ).value ("23501206586" ))
@@ -550,7 +550,7 @@ public void listaPaginada_erroDeServidor_retorno500() throws Exception {
550550 .andExpect (jsonPath ("$.content[1].email" ).value ("antonio@gmail.com" ))
551551 .andExpect (jsonPath ("$.content.length()" ).value (2 ));
552552
553- verify (service ).listaPaginadaPorOrdenacao (1 , 2 , "id" );
553+ verify (service ).listaPaginadaPorOrdenacao (0 , 2 , "id" );
554554 verifyNoMoreInteractions (service );
555555 }
556556
0 commit comments