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

feat : 밸리데이션 정리 및 밸리데이션 테스트 코드 작성 #345

Merged
merged 2 commits into from
Feb 12, 2023

Conversation

sanbonai06
Copy link
Member

개요

작업사항

  • 발급 티켓 입장 처리 및 취소 로직에서 상태 검증 밸리데이션을 ENUM 클래스에 있는 메서드로 바꿨습니다.
  • IssuedTicketValidator에 있는 로직의 테스트 코드를 작성했습니다.
  • 이제 IssuedTicketDomainService의 테스트코드를 작성할 예정입니다.

변경로직

  • 내용을 적어주세요.

@sanbonai06 sanbonai06 added For: API [이슈 대상] 외부 API Type: Test Type: Test [이슈 목적] 테스트 코드 추가, 수정 labels Feb 11, 2023
@sanbonai06 sanbonai06 added this to the 두둥 스프린트 2차 milestone Feb 11, 2023
@sanbonai06 sanbonai06 self-assigned this Feb 11, 2023
Copy link
Member

@ImNM ImNM 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 +33 to 37

public Boolean is(IssuedTicket issuedTicket) {
return issuedTicket.getIssuedTicketStatus() == IssuedTicketStatus.ENTRANCE_INCOMPLETE;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

이건 어디에 쓰는건가염

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 319 Code Smells

16.4% 16.4% Coverage
0.0% 0.0% Duplication

Copy link
Member

@gengminy gengminy left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -190,7 +190,7 @@ public void entrance() {
티켓이 입장 완료 상태가 아니면 입장 취소 할 수 없음
*/
public void entranceCancel() {
if (this.issuedTicketStatus != IssuedTicketStatus.ENTRANCE_COMPLETED) {
if (!this.issuedTicketStatus.isAfterEntrance()) {
throw CanNotCancelEntranceException.EXCEPTION;
}
this.issuedTicketStatus = IssuedTicketStatus.ENTRANCE_INCOMPLETE;
Copy link
Member

@gengminy gengminy Feb 11, 2023

Choose a reason for hiding this comment

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

Event 엔티티의 setStatus() 참고하면 중복된 코드 구조 줄일 수 있을 거 같아욤

@sanbonai06 sanbonai06 merged commit 4ebedfe into dev Feb 12, 2023
@sanbonai06 sanbonai06 deleted the refactor/342-issuedTicket-validation branch February 12, 2023 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: API [이슈 대상] 외부 API Type: Test Type: Test [이슈 목적] 테스트 코드 추가, 수정
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🔨[refactor] 발급 티켓 도메인 및 도메인 서비스 로직들 밸리데이션 정리
3 participants