-
Notifications
You must be signed in to change notification settings - Fork 8
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
[BE] feat: 관리자 티켓 발급 구현(#117) #134
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.
간단한 리뷰 남겼습니다!
mockMvc.perform(post("/admin/tickets") | ||
.content(objectMapper.writeValueAsString(request)) | ||
.contentType(MediaType.APPLICATION_JSON)) | ||
.andDo(print()) | ||
.andExpect(status().isOk()) | ||
.andExpect(jsonPath("$.id").value(ticketId)) | ||
.andExpect(jsonPath("$.stageId").value(stageId)) | ||
.andExpect(jsonPath("$.ticketType").value(ticketType.name())) | ||
.andExpect(jsonPath("$.totalAmount").value(totalAmount)); |
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.
jsonPath를 사용하신 이유가 있나요?
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.
jsonPath 로 하나의 흐름을 보고 싶다는 취지였는데
변경시 직접 값들을 다 바꿔줘야한다는 점에 objectMapper 를 사용하도록 변경했습니다!
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.
수고 많으셨어요 푸우!!!
티켓의 입장시간이 Stage startTime 이후인 경우 / 혹은 너무 이른 경우 (무대 시작 시간은 7/27인데 입장 시간은 7/26이라던가)에 대한 도메인 단의 validate 처리가 필요할 것 같아요.
추가적으로 티켓 수량의 MIN / MAX 도 정해주면 좋을 것 같습니다! (적어도 0장 이하는 절대 안되게)
@DisplayNameGeneration(ReplaceUnderscores.class) | ||
@SuppressWarnings("NonAsciiCharacters") | ||
class TicketServiceTest extends ApplicationTest { |
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.
Service 테스트 어플리케이션 테스트로 하신 이유가 있나요 ?!
EntryServiceTest는 Mock으로 진행했어서요!
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.
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.
고생하셨습니다!
@DisplayNameGeneration(ReplaceUnderscores.class) | ||
@SuppressWarnings("NonAsciiCharacters") | ||
class TicketServiceTest extends ApplicationTest { |
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.
📌 관련 이슈