create-unit-test

Generate .NET unit test suites with Shouldly assertions and mocks.

2|Updated May 2, 2026
One-click install
npx skills add https://github.com/andrecini/dotnet-squad-copilot-agent --skill create-unit-test-andrecini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-unit-test
Source: https://github.com/andrecini/dotnet-squad-copilot-agent/tree/main/.claude/skills/create-unit-test
Command: npx skills add https://github.com/andrecini/dotnet-squad-copilot-agent --skill create-unit-test-andrecini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill removes the manual effort of writing thorough unit tests by producing a complete, structured test suite for a target class.

Core Features & Use Cases

  • Automated scenario mapping: derives success, failure, and edge-case scenarios from the provided class name or source code.
  • Test suite completeness: generates or updates Data Mocks, Mock Classes, and test cases together as one coherent unit.
  • Quality and safety guardrails: enforces project-scoped file creation, prevents integration test generation, uses Shouldly only, and requires at least 85% scenario coverage.
  • Conflict-aware updates: checks existing files and asks before overwriting when a test class or related artifacts already exist.

Quick Start

Ask it to create unit tests for a specific class by providing the class name (or pasting the class code) and confirm any overwrite prompts if files already exist.

Frequently Asked Questions about create-unit-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate unit tests for a C# class using mocks and builders?

To generate unit tests for a C# class, provide the class name or source code. The tool maps public methods to success, failure, and edge-case scenarios, creating data builders and mocks for deterministic behavior.

What is the best way to reach 85% test coverage in .NET without writing integration tests?

Generating unit test suites with mocks and data builders ensures at least 85% scenario coverage. It enforces project-scoped output and strictly prevents generating integration tests.

Can I use Shouldly for assertions when creating unit test suites?

Yes, Shouldly is the required assertion framework. The generator uses Shouldly exclusively for assertions when creating or updating test cases and related artifacts.

Does the generator update existing mocks or overwrite test files automatically?

The generator updates existing mocks without duplication and checks existing files before overwriting. It prompts for confirmation when a test class or related artifacts already exist.

How does automated scenario mapping work for clean architecture unit tests?

Automated scenario mapping derives success, failure, and edge-case scenarios from the provided class source. It generates or updates data mocks, mock classes, and test cases together as one coherent unit.