Posts by Gabriel Duarte Rodrigues • 23 points
3 posts
-
0
votes1
answer121
viewsQ: HTTP GET in JAVA with a different result than POSTMAN
I am running an HTTP Get Request in Java using Gson to use the data in my program, but the first and last attribute are coming as null. However, when performing the request in POSTMAN I saw that…
-
1
votes1
answer315
viewsA: Unit test (Junit and Mockito) - Clean & maintainable test code requires zero unnecessary code
Debugging the test, I noticed that two MOCKS of MAPPER were being created by Mockito, making this when(doctorMapper.toDTO(expectedDoctor)).thenReturn(expectedDoctorDTO); was never executed, as it…
-
1
votes1
answer315
viewsQ: Unit test (Junit and Mockito) - Clean & maintainable test code requires zero unnecessary code
I am writing the test of a findByID method(): public DoctorDTO getDoctorById(long id) throws DoctorNotFoundException { Optional<Doctor> doctorO = VerifyIfExists(id); return…