-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/4 implement User #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코틀린 스프링부트에 관한 내용이 많아서 보기 어려운것들은 패스하고, 아는 한에서 열심히 댓글 달아봤습니다 :)
src/main/kotlin/com/group4/ticketingservice/controller/UserController.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/TicketingserviceApplication.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/controller/UserController.kt
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/service/impl/UserServiceImpl.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/service/impl/UserServiceImpl.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/service/UserDetailService.kt
Show resolved
Hide resolved
Todo
|
src/main/kotlin/com/group4/ticketingservice/service/impl/UserServiceImpl.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/service/UserDetailService.kt
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/service/impl/UserServiceImpl.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/TicketingserviceApplication.kt
Outdated
Show resolved
Hide resolved
test 작성시 참고: Spring Security가 적용된 곳을 효율적으로 테스트하자. 아마 로그인 관련 로직 unit test는 자료 조사가 많이 필요할 것 같습니다. (통합테스트는 아직입니다 #31 에서 준비중) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
유닛 테스트 / 통합 테스트
SignIn, GetAceessToken 테스트는 그대로 Integration 에서 진행하고
CreateUser에 대한 Controller Test는 src/test/
밑으로 옮기면 될것 같습니다.
필요없어진 TestUserDetailService
는 삭제 부탁드립니다.
의견
- Fake Object
TestUserDetailService
의 관리가 점점 부담으로 다가올 것으로 예상 - 각 테스트 단위로 메서드를 쉽게 Mock up할 수 있지만 Fake Object는 input에 대한 조건문을 구현해야하는 복잡성
- createUser는 spring security 관련 의존성이 없으니 슬라이스 테스트(
src/test/...
) 진행
src/test/kotlin/com/group4/ticketingservice/user/UserControllerTest.kt
Outdated
Show resolved
Hide resolved
src/integrationTest/kotlin/com/group4/ticketingservice/User/UserControllerTest.kt
Outdated
Show resolved
Hide resolved
src/integrationTest/kotlin/com/group4/ticketingservice/User/UserControllerTest.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/controller/UserController.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/service/UserService.kt
Outdated
Show resolved
Hide resolved
src/test/kotlin/com/group4/ticketingservice/bookmark/BookmarkControllerTest.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KtFormat
돌려 주세요! 이제 끝이네요! 굳입니다 👍
src/integrationTest/kotlin/com/group4/ticketingservice/User/UserControllerTest.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/group4/ticketingservice/TicketingserviceApplication.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고수고했습니다!
What is this PR?
Key Changes
Test Checklist