SKILL

csharp-testing

xUnit、FluentAssertions、モッキング、統合テスト、テスト組織のベストプラクティスを使用したC#と.NETのテストパターン。

Original · translation did not pass checks

Target: Software development & testing. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original Japanese text

Topics in the source

  • C#テストパターン
  • 起動条件
  • テストフレームワークスタック
  • ユニットテスト構造
  • Arrange-Act-Assert
  • Theoryによるパラメータ化テスト
  • NSubstituteによるモッキング
  • ASP.NET Core統合テスト

xUnit、FluentAssertions、最新のテストプラクティスを使用した.NETアプリケーションの包括的なテストパターン。 C#コードの新しいテストを書く場合 テスト品質とカバレッジのレビュー .NETプロジェクトのテストインフラストラクチャの設定 フレーキーまたは遅いテストのデバッグ | ツール | 目的 | |---|---| | xUnit | テストフレームワーク(.NETに推奨) | | FluentAssertions | 読みやすいアサーション構文 | | NSubstituteまたはMoq | 依存関係のモッキング | | Testcontainers | 統合テストでの実際のインフラ | | WebApplicationFactory | ASP.NET Core統合テスト | | Bogus | 現実的なテストデータ生成 | | アンチパターン | 修正方法 | |---|---| | 実装の詳細をテストする | 動作と結果をテストする | | 共有の可変テスト状態 | テストごとに新しいインスタンス(xUnitはコンストラクタでこれを行う) | | 非同期テストでのThread.Sleep | タイムアウトまたはポーリングヘルパーを使用したTask.Delay | | ToString()出力のアサーション | 型付きプロパティのアサーション | | テストごとに1つの巨大なアサーション | テストごとに1つの論理的なアサーション | | 実装を記述するテスト名 | 動作で命名: MethodExpectedResultWhenCondition | | CancellationTokenを無視する | 常に渡してキャンセルを確認する |

Source repository
affaan-m/ECC
Source file
docs/ja-JP/skills/csharp-testing/SKILL.md
Fixed revision
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:49.088Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.