Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the post title validation tests to accommodate the increased maximum length of post titles. The changes ensure that the tests accurately reflect the new validation rules for both creating and updating posts. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이 PR은 포스트 제목의 최대 길이가 15자에서 40자로 변경됨에 따라 관련 유효성 검증 테스트를 수정한 것으로 보입니다. 변경 사항은 올바르게 반영되었습니다. 다만, 테스트 코드 전반에 걸쳐 40, 41과 같은 매직 넘버가 사용되고 있어 유지보수성 측면에서 개선의 여지가 있습니다. 각 테스트에서 사용된 매직 넘버를 상수로 대체하여 코드의 가독성을 높이고 향후 변경에 더 유연하게 대응할 수 있도록 하는 것이 좋습니다. 자세한 내용은 개별 코멘트를 참고해주세요.
| void title_Size_초과_실패() { | ||
| // given | ||
| String longTitle = "a".repeat(16); | ||
| String longTitle = "a".repeat(41); |
There was a problem hiding this comment.
| // then | ||
| assertThat(violations).hasSize(1); | ||
| assertThat(violations.iterator().next().getMessage()).isEqualTo("제목은 15자를 초과할 수 없습니다"); | ||
| assertThat(violations.iterator().next().getMessage()).isEqualTo("제목은 40자를 초과할 수 없습니다"); |
| void title_40자_정확히_성공() { | ||
| // given | ||
| String exactTitle = "a".repeat(15); // 정확히 15자 | ||
| String exactTitle = "a".repeat(40); // 정확히 40자 |
Summary
PostValidationTest의 제목 검증 테스트를 15자 → 40자 기준으로 수정repeat(16)→repeat(41), 경계값 성공 테스트도repeat(15)→repeat(40)