0924.2024.Today I Learned

Sungju Kim·2024년 9월 25일

Sparta_Coding_Camp_TIL

목록 보기
39/53

Unit Testing (feat.UserController)

When I tried to test the delete method from the UserController, I would keep getting 400 as my returning status code, not 200.

UserController.java

Turns out, it was my request DTO not being able to access the delete method in the controller due to the fact that there only a single "argument" in the DTO class when I was using an @AllArgsContructor. The error went away when I added the @NoArgsContructor tag.

UserDeleteRequest.java (DTO)

profile
Fully ✨committed✨ developer, always eager to learn!

0개의 댓글