presentation-tdd
Controller, Request/Response DTO 클래스를 구현할 때 반드시 사용. 프레젠테이션 계층 구현 시 Outside-In TDD로 인수 테스트부터 시작. "Controller 구현", "API 구현", "엔드포인트 구현", "Request DTO", "Response DTO" 작업 시 자동 발동.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
프레젠테이션 계층 TDD 지침
TDD 순서
- 인수 테스트 (≠실패) → Controller + DTO 구현
- API 문서 테스트 → 문서화 완성
특이사항
- Outside-In TDD: 인수 테스트부터 시작
-
베이스 클래스:
AcceptanceTestBase/ApiDocsTestBase상속 -
보안:
@WithMockOAuth2User필수 -
CSRF: POST/PUT/DELETE에
.postProcessors(csrf())필수
핵심 규칙
Controller 규칙
- 하나의 Controller에 하나의 API만 작성
- 모든 엔드포인트는
/api/로 시작 - 비즈니스 로직/예외 처리 금지 (Service 책임)
DTO 명명
- Request:
{Find/Save/Modify/Delete}{도메인}Request - Response:
{Find/Save/Modify/Delete}{도메인}Response - record 타입 필수
Controller 명명
-
{Find/Save/Modify/Delete}{도메인}Controller
상세 지침
[필수] 아래 참조 문서를 모두 읽은 후 작업을 시작하세요:
- TDD 사이클: tdd-cycle.md
- 명명 규칙: naming.md
- 아키텍처: architecture.md
- 코딩 스타일: coding.md
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!