Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add register and select ArbitraryBuilder by name #1036
Add register and select ArbitraryBuilder by name #1036
Changes from 5 commits
cf69e46
49db542
4122b1e
802378a
e98200a
65baf7d
6fb23b6
9c4f7f8
83db7cd
685aa58
2b63c65
0193617
3deaa89
6b1b21a
7a30d04
c8936d4
113f4d2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
엇 테스트는 reflection으로 내부 상태를 조회해서 검증하는 방향이 아니라
실제 생성한 값이 register한 값인지 확인하는 방향으로 진행하면 좋을 것 같습니다.
내부 상태는 리팩토링하면 언제든지 변경이 될 수 있으므로 사용자와 동일하게 public한 API를 사용해서 테스트하는 게 추후 변경 가능성을 높이는 데 도움이 됩니다.
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.
설명이 부족했는데요, 실행 가능한 단위는 외부에 공개된 public한 API을 통해 간접적으로 실행 가능하다는 의미이긴 합니다. ex, 구현한 기능이
ArbitraryBuilder#sample
을 통해 실행이 되는지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.
@seongahjo
저도 성아님의 의견에 동의합니다.
하지만 현재는 registeredName API를 통해서 register한 연산을 등록하는 기능만 구현을 한 상태입니다.
실제 생성한 값과 register한 값을 비교하는 테스트는 select를 구현하는 다음 PR에서 구현을 할 계획이었습니다!
이번 PR에서는 등록을 하는 것이 목적이라 생각해 public한 API를 사용해 테스트를 하는 것은 어느정도 한계가 있을 것 같습니다!
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.
PR을 그렇게 나누신 이유가 있으실까요??
말씀주신 방법대로 나누는 방법으로 하면 PR이 작아지기는 하는데요, 지금 단계에서는 구현이 어떤 방향으로 진행이 될지 알기 어려워서 리뷰하기가 어려운 측면이 있습니다. 자세한 의도는 모르겠지만, 지금 드는 생각으로는 가능하면 테스트를 작성할 수 있는 단위까지 구현하시면 좋지 않을까 생각이 듭니다.
리팩토링같은 엄청 큰 작업이 아니라 이 PR에서 아래 작업까지 구현하셔도 괜찮지 않을까 싶습니다.
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.
성아님과 이메일을 주고 받을 때 단계 별로 진행해보는 것이 좋을 것 같다고 하셔서 여러 개의 PR로 작업한다고 이해를 했습니다..!😅
넵! 그러면 테스트를 작성할 수 있는 단위까지 구현한 뒤 테스트를 수정하도록 하겠습니다!
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.
넵, 여러 개의 PR을 말씀드렸던 것은 기능 구현을 여러 단계로 구현하는 방향을 말씀드린 거긴 합니다.
ex.
name을 키로 등록하는 register할 수 있게 구현
->(name, 타입)을 키로 register할 수 있게 구현