Agent skill · software engineering · affaan-m

csharp-testing

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

Why this skill is useful

Provides specific testing patterns and practices for C# and .NET applications that the AI wouldn't reliably generate on its own.

What it needs

Requires fluentassertions, nsubstitute, testcontainers, xunit installed locally. About 3k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.

What this skill does

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

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills affaan-m/csharp-testing

View the source on GitHub

Browse the @skills marketplace