Files
pos-system/microservices/docs/en/skills/testing-patterns.md
Ho Ngoc Hai 76d75c753b Migrate
2026-05-23 18:37:02 +07:00

1.3 KiB

Unit/Integration testing patterns cho

Skill: testing-patterns
Compatibility: .NET 10+, xUnit, NSubstitute, Testcontainers, Microsoft.AspNetCore.TestHost

Overview

Unit/Integration testing patterns cho .NET microservices. Use for xUnit, NSubstitute, Testcontainers, và testing MediatR handlers.

When to Use

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

Quick Reference

For detailed patterns, code examples, and best practices, refer to the full skill documentation.

See Skills Index for related skills.

Additional Resources


Vietnamese Version: Tài liệu tiếng Việt