generate-unit-test

Community

Auto-generate NUnit test skeletons for C#

AuthorCloudyWing
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Developers spend repetitive time writing boilerplate unit tests and setting up mocks for C# classes; this Skill automates the creation of NUnit test skeletons so engineers can focus on test logic rather than structure and setup.

Core Features & Use Cases

  • Automatic test skeletons: Generates NUnit test classes per C# class with Arrange/Act/Assert structure and standard naming conventions.
  • Mock wiring: Detects constructor dependencies and creates NSubstitute mocks, including async method templates and IDisposable handling.
  • Project integration: Locates or prompts for the test project, ensures conventional test file placement, and appends missing test methods without overwriting existing tests.
  • Use Case: Convert a service class with multiple public methods into a ready-to-edit test file that includes Happy Path tests, null/exception cases, and collection result edge cases.

Quick Start

Use /generate-unit-test with the target class name or .cs file path to generate NUnit tests with NSubstitute mocks and standard AAA structure.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: generate-unit-test
Download link: https://github.com/CloudyWing/ai-dotfiles/archive/main.zip#generate-unit-test

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.