test-writer

Generate NUnit tests for .NET domain logic, repositories, APIs, and services.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/roromanenko/NewsParser --skill test-writer-roromanenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-writer
Source: https://github.com/roromanenko/NewsParser/tree/main/.claude/skills/testing
Command: npx skills add https://github.com/roromanenko/NewsParser --skill test-writer-roromanenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing, reviewing, and maintaining tests for .NET projects can be repetitive and error-prone. This skill standardizes test creation using NUnit, Moq, and FluentAssertions, helping teams accelerate QA while preserving quality.

Core Features & Use Cases

  • Generate domain logic unit tests following AAA patterns.
  • Create repository contract tests with mocks against interface definitions.
  • Add API endpoint tests using WebApplicationFactory for integration-like coverage.
  • Produce service and worker tests with mocked dependencies to validate behavior.
  • Support parameterized tests with TestCase and enforce project testing conventions (AAA, naming, anti-patterns).

Quick Start

Create example NUnit test projects and add domain, repository, and API tests to begin validating the codebase.

Frequently Asked Questions about test-writer

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

FAQPage Schema
How do I automate NUnit test generation for .NET domain logic?

You can automate NUnit test generation for .NET domain logic by applying standardized AAA patterns and TestCase-driven variations, ensuring consistent test coverage across business rules without manual boilerplate creation.

What is the best way to write repository contract tests with Moq in .NET?

Repository contract tests with Moq are best written by mocking interface definitions directly, allowing you to validate repository behavior and data access contracts in .NET without needing a live database connection.

Does this approach support API endpoint testing with WebApplicationFactory?

Yes, API endpoint testing is supported using WebApplicationFactory to provide integration-like coverage, enabling you to validate HTTP endpoints and middleware behavior within your .NET test suite.

Can I use FluentAssertions with NUnit for parameterized tests?

Yes, you can use FluentAssertions with NUnit to enhance parameterized tests, combining TestCase-driven variations with fluent assertion syntax to produce highly readable and maintainable test validations.

What dependencies do I need to set up .NET worker service tests with mocks?

To set up .NET worker service tests with mocks, you need NUnit 4.x, Moq for mocking dependencies, and FluentAssertions, allowing you to validate background service behavior independently of external systems.

Why should I enforce AAA patterns in .NET unit testing?

Enforcing AAA patterns in .NET unit testing standardizes test structure into Arrange, Act, and Assert sections, reducing error-prone boilerplate and making test logic easier to read, review, and maintain across teams.