moq
✓Moq 프레임워크를 사용하여 단위 테스트에서 종속성을 모의합니다. 사용 시기: 단위 테스트 작성, 인터페이스에 대한 테스트 더블 생성, 메서드 호출 확인, 비동기 작업 모의
SKILL.md
Moq provides type-safe mocking for .NET unit tests. Sorcha uses Moq extensively across 30+ test projects to isolate components and verify interactions. The codebase favors constructor injection with mocks stored as private readonly fields.
| Mock | Create mock instance | new Mock () | | .Object | Get mock instance | mock.Object | | Mock.Of () | Quick mock for simple deps | Mock.Of >() | | Setup() | Configure behavior | .Setup(x => x.Method()) | | ReturnsAsync() | Async return value | .ReturnsAsync(result) | | Callback() | Capture arguments | .Callback ((arg) => captured = arg) |
| Verify() | Assert method called | .Verify(x => x.Method(), Times.Once) | | It.IsAny () | Match any argument | It.IsAny () | | It.Is () | Match with predicate | It.Is (x => x.Id == 1) |
인용 가능한 정보
AI/검색 인용용 안정적인 필드와 명령어.
- 설치 명령어
npx skills add https://github.com/stuartf303/sorcha --skill moq- 카테고리
- </>개발 도구
- 인증됨
- ✓
- 최초 등록
- 2026-02-01
- 업데이트
- 2026-02-18
빠른 답변
moq이란?
Moq 프레임워크를 사용하여 단위 테스트에서 종속성을 모의합니다. 사용 시기: 단위 테스트 작성, 인터페이스에 대한 테스트 더블 생성, 메서드 호출 확인, 비동기 작업 모의 출처: stuartf303/sorcha.
moq 설치 방법은?
터미널 또는 명령줄 도구(Terminal, iTerm, Windows Terminal 등)를 엽니다 이 명령어를 복사하여 실행합니다: npx skills add https://github.com/stuartf303/sorcha --skill moq 설치 후 스킬은 자동으로 AI 코딩 환경에 설정되어 Claude Code나 Cursor에서 사용할 수 있습니다
소스 저장소는 어디인가요?
https://github.com/stuartf303/sorcha
상세
- 카테고리
- </>개발 도구
- 출처
- skills.sh
- 최초 등록
- 2026-02-01