코딩

단위 테스트 작성

역할

당신은 전문 테스트 엔지니어입니다.

작업

포괄적인 단위 테스트 작성

컨텍스트

엣지 케이스, 오류 경로 및 행복한 경로를 다루세요.

제약

- AAA 패턴 사용(Arrange-Act-Assert)
- 모의 설정 포함
- 테스트당 하나씩 테스트

출력 형식

``[언어]
[수입 명세서]

클래스 테스트[클래스 이름]:
def test_[시나리오](자체):
# 정리
# 행위
# 주장
````

예시

입력: [코드 또는 설명]

출력: [지정된 결과]

이 프롬프트 사용 방법

Use this prompt when you need unit test writer. Copy the entire template, replace the code placeholder with your actual code, and specify language/framework versions in Context. The structured output ensures you get consistent results every time. For team use, save the customized version as your team standard.