Skip to content

[DEV-176/BE] test: QnaSetController 테스트 작성#369

Merged
zxc534 merged 23 commits intodevfrom
DEV-176/test/qna-set-controller-통합-테스트-작성
Feb 15, 2026

Hidden character warning

The head ref may contain hidden characters: "DEV-176/test/qna-set-controller-\ud1b5\ud569-\ud14c\uc2a4\ud2b8-\uc791\uc131"
Merged

[DEV-176/BE] test: QnaSetController 테스트 작성#369
zxc534 merged 23 commits intodevfrom
DEV-176/test/qna-set-controller-통합-테스트-작성

Conversation

@zxc534
Copy link
Collaborator

@zxc534 zxc534 commented Feb 13, 2026

관련 이슈

close #249

작업한 내용

  • QnaSetController 테스트 작성
  • 테스트 작성하지 않은 API
    • getFrequentQuestions()
    • createStarAnalysis(): gemini 요청 부분 모킹이 필요해서 보류
    • getScrapFoldersContainigQnaSet

@zxc534 zxc534 self-assigned this Feb 13, 2026
@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
web-team4-refit Ignored Ignored Preview Feb 13, 2026 5:08pm

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @zxc534, 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!

이 Pull Request는 QnaSetController 및 관련 서비스에 대한 포괄적인 통합 테스트를 도입합니다. 이는 Q&A 세트 생성, 업데이트, 삭제 및 PDF 하이라이팅 관리와 같은 작업이 QnaSetDraft 인터뷰 검토 상태를 올바르게 적용하도록 보장합니다. 또한, API 문서가 개선되었고 테스트 유틸리티 메서드가 추가되었습니다.

Highlights

  • QnaSetController API 설명 업데이트 및 TODO 추가: QnaSetController의 updateQnaSetupdatePdfHighlighting API 작업에 대한 설명을 업데이트하여 QnaSetDraft 상태에서만 해당 작업이 가능함을 명시했습니다. 또한, getQnaSet, createStarAnalysis, getScrapFoldersContainingQnaSet에 대한 통합 테스트 TODO 주석을 추가했습니다.
  • QnaSetService에 인터뷰 검토 상태 유효성 검사 추가: QnaSetService의 updateQnaSetupdatePdfHighlighting 메서드에 InterviewReviewStatus.QNA_SET_DRAFT 상태 유효성 검사를 추가하여, 특정 상태에서만 Q&A 세트 수정 및 PDF 하이라이팅 업데이트가 가능하도록 했습니다. 또한, 사용되지 않는 removeDuplicatedIds 헬퍼 메서드를 제거했습니다.
  • 통합 테스트 유틸리티 확장: IntegrationTest 클래스에 QnaSetRepository, PdfHighlightingRepository, PdfHighlightingRectRepository에 대한 @Autowired 필드를 추가하고, 테스트 설정을 용이하게 하기 위한 createQnaSetcreateAndSavePdfHighlighting 헬퍼 메서드를 도입했습니다.
  • QnaSetController 통합 테스트 추가: QnaSetController의 모든 주요 기능(생성, 수정, 삭제, 마킹, PDF 하이라이팅 관리)에 대한 포괄적인 통합 테스트 파일 QnaSetIntegrationTest.java를 새로 추가했습니다. 이 테스트들은 InterviewReviewStatus 및 접근성 제어에 대한 성공 및 실패 시나리오를 검증합니다.
Changelog
  • backend/src/main/java/com/shyashyashya/refit/core/IntegrationTest.java
    • 새로운 리포지토리 의존성을 추가했습니다.
    • QnaSet 및 PdfHighlighting을 위한 테스트 헬퍼 메서드를 도입했습니다.
  • backend/src/main/java/com/shyashyashya/refit/domain/qnaset/api/QnaSetController.java
    • API 작업 설명을 업데이트했습니다.
    • TODO 주석을 제거하고 통합 테스트를 위한 새로운 TODO 주석을 추가했습니다.
  • backend/src/main/java/com/shyashyashya/refit/domain/qnaset/service/QnaSetService.java
    • 업데이트 및 PDF 하이라이팅 메서드에 인터뷰 검토 상태 유효성 검사를 추가했습니다.
    • 사용되지 않는 헬퍼 메서드를 제거했습니다.
  • backend/src/test/java/com/shyashyashya/refit/integration/qnaset/QnaSetIntegrationTest.java
    • 새 파일: QnaSetController 엔드포인트에 대한 통합 테스트를 구현했습니다.
Activity
  • 이 Pull Request의 주요 활동은 QnaSetController에 대한 통합 테스트를 작성하는 것입니다.
  • 관련 이슈 #249를 해결하기 위한 작업입니다.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

QnaSetController에 대한 통합 테스트를 추가하는 좋은 PR입니다. 서비스 레이어에서 상태 유효성 검사를 강제하는 변경 사항도 올바르게 적용되었습니다.

테스트를 개선하기 위한 몇 가지 제안 사항이 있습니다:

  • 일부 테스트 이름이 오해의 소지가 있습니다.
  • 다수의 테스트가 HTTP 상태 코드만 확인하고 있어 비즈니스 로직의 버그를 놓칠 수 있습니다. 특정 사례를 지적하고 데이터베이스 상태 변경을 확인하는 단언문(assertion)을 추가할 것을 제안했습니다.
  • 테스트 설정에 중복된 코드가 있어 리팩토링이 필요해 보입니다.

자세한 내용은 각 코멘트를 확인해주세요.

Copy link
Collaborator

@kckc0608 kckc0608 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~! 코멘트 몇 가지 남겼으니 확인 부탁드립니다!

Copy link
Collaborator

@lja3723 lja3723 left a comment

Choose a reason for hiding this comment

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

LGTM

@zxc534 zxc534 merged commit 9b93bcc into dev Feb 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DEV-176/BE] test: qna set controller 통합 테스트 작성

3 participants