scaffold-tests

Create xUnit .NET/C# test projects mirroring src/ structure with NSubstitute and AwesomeAssertions.

1|Updated May 30, 2026
One-click install
npx skills add https://github.com/FixPortal/fixportal-claude-skills --skill scaffold-tests-fixportal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-tests
Source: https://github.com/FixPortal/fixportal-claude-skills/tree/main/skills/scaffold-tests
Command: npx skills add https://github.com/FixPortal/fixportal-claude-skills --skill scaffold-tests-fixportal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create and maintain xUnit test projects that mirror the src/ structure, using NSubstitute for mocking and AwesomeAssertions for assertions, to ensure consistent test scaffolding and naming across a codebase.

Core Features & Use Cases

  • Mirror src structure: each src/{ProjectName} gains a corresponding tests/{ProjectName}.UnitTests project, with proper ProjectReference to the source.
  • Enforce testing conventions: xUnit.v3, NSubstitute for mocks, AwesomeAssertions for assertions, and parameterized tests where applicable.
  • Quick start-oriented workflow: scaffold tests for new or existing projects, or align an existing repo's test layout with the source.

Quick Start

Create a tests/{ProjectName}.UnitTests project that mirrors the corresponding src/{ProjectName} project.

Frequently Asked Questions about scaffold-tests

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

FAQPage Schema
How do I scaffold xUnit tests for an existing .NET project?

Scaffold xUnit tests by mirroring the src/ structure into tests/ projects, adding a ProjectReference to the source, and using NSubstitute with AwesomeAssertions for .NET 10+.

How do I align my .NET test project hierarchy with my source code?

Align your .NET test hierarchy by mirroring the src/ directory layout under tests/, ensuring each test project has a ProjectReference to its corresponding source project for structural consistency.

Does this test scaffolding workflow use xUnit v3 and .NET 10?

Yes, the test scaffolding workflow enforces xUnit v3 and requires a .NET 10+ environment, applying NSubstitute for mocking and AwesomeAssertions for assertions within the generated test projects.

What's the best way to add missing unit tests to a C# codebase using NSubstitute?

The best way to add missing tests is to apply this scaffolding workflow, which generates test files mirroring the src/ structure and automatically enforces NSubstitute for mocks and AwesomeAssertions for assertions.

Can I use this to create parameterized tests with AwesomeAssertions in xUnit?

Yes, when scaffolding xUnit test projects, the workflow enforces testing conventions including parameterized tests and integrates AwesomeAssertions to standardize assertion logic across the .NET codebase.

Why do my scaffolded .NET tests need a ProjectReference to the src project?

Scaffolded .NET tests need a ProjectReference to the src project to directly access and verify the source code, ensuring the test hierarchy mirrors the src/ structure and maintains accurate compilation dependencies.