Skip to content
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

Merged
merged 4 commits into from
Jul 28, 2023
Merged

[BE] feat: 관리자 티켓 발급 구현(#117) #134

merged 4 commits into from
Jul 28, 2023

Conversation

BGuga
Copy link
Member

@BGuga BGuga commented Jul 27, 2023

@BGuga BGuga added BE 백엔드에 관련된 작업 ADMIN labels Jul 27, 2023
@BGuga BGuga self-assigned this Jul 27, 2023
@BGuga BGuga linked an issue Jul 27, 2023 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Jul 27, 2023

Unit Test Results

60 tests  +8   60 ✔️ +8   2s ⏱️ -1s
19 suites +1     0 💤 ±0 
19 files   +1     0 ±0 

Results for commit 95553ab. ± Comparison against base commit 565cc7b.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@seokjin8678 seokjin8678 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

간단한 리뷰 남겼습니다!

Comment on lines 190 to 198
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));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsonPath를 사용하신 이유가 있나요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsonPath 로 하나의 흐름을 보고 싶다는 취지였는데
변경시 직접 값들을 다 바꿔줘야한다는 점에 objectMapper 를 사용하도록 변경했습니다!

Copy link
Member

@xxeol2 xxeol2 left a 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장 이하는 절대 안되게)

@BGuga BGuga changed the title [BE] feat: 관리자 티켓 발급 구현(#116) [BE] feat: 관리자 티켓 발급 구현(#117) Jul 27, 2023
Comment on lines +14 to +16
@DisplayNameGeneration(ReplaceUnderscores.class)
@SuppressWarnings("NonAsciiCharacters")
class TicketServiceTest extends ApplicationTest {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Service 테스트 어플리케이션 테스트로 하신 이유가 있나요 ?!
EntryServiceTest는 Mock으로 진행했어서요!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@seokjin8678 seokjin8678 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

Comment on lines +14 to +16
@DisplayNameGeneration(ReplaceUnderscores.class)
@SuppressWarnings("NonAsciiCharacters")
class TicketServiceTest extends ApplicationTest {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BGuga BGuga merged commit 7d903a7 into dev Jul 28, 2023
3 checks passed
@BGuga BGuga deleted the feat/#117 branch July 28, 2023 03:21
seokjin8678 pushed a commit that referenced this pull request Jul 28, 2023
* feat: 관리자 티켓 생성 기능 구현

* refactor: 값 검증을 objectMapper 를 통한 객체로 통일

* feat: Ticket 검증 로직 추가

* test: 도메인 변경사항 테스트 적용
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADMIN BE 백엔드에 관련된 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] 축제 관리자를 위한 티켓 발급 API를 구축한다.
4 participants