35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
# Unit/Integration testing patterns cho
|
|
|
|
> **Skill**: `testing-patterns`
|
|
> **Compatibility**: .NET 10+, xUnit, NSubstitute, Testcontainers, Microsoft.AspNetCore.TestHost
|
|
|
|
## Tổng Quan
|
|
|
|
Unit/Integration testing patterns cho .NET microservices. Use for xUnit, NSubstitute, Testcontainers, và testing MediatR handlers.
|
|
|
|
## Khi Nào Sử Dụng
|
|
|
|
Use this skill when:
|
|
- Writing unit tests for handlers / Viết unit tests cho handlers
|
|
- Testing controllers with mocked dependencies / Test controllers với dependencies giả lập
|
|
- Creating integration tests with database / Tạo integration tests với database
|
|
- Setting up functional tests with TestServer / Cài đặt functional tests với TestServer
|
|
- Mocking services với NSubstitute / Giả lập services với NSubstitute
|
|
|
|
## Tham Chiếu Nhanh
|
|
|
|
Để biết chi tiết về patterns, code examples, và best practices, xem tài liệu skill đầy đủ.
|
|
|
|
## Skills Liên Quan
|
|
|
|
Xem [Danh Mục Skills](./index.md) để tìm skills liên quan.
|
|
|
|
## Tài Nguyên Bổ Sung
|
|
|
|
- **Tài Liệu Skill Đầy Đủ**: [`.agent/skills/testing-patterns/SKILL.md`](../../.agent/skills/testing-patterns/SKILL.md)
|
|
- **Ví Dụ Code**: [`.agent/skills/testing-patterns/references/REFERENCE.md`](../../.agent/skills/testing-patterns/references/REFERENCE.md)
|
|
|
|
---
|
|
|
|
**English Version**: [English Documentation](../../en/skills/testing-patterns.md)
|