rm-guide-testing

Enforce TUnit testing conventions for assertions, test doubles, and helper placement.

Updated Nov 11, 2023
One-click install
npx skills add https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb --skill rm-guide-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rm-guide-testing
Source: https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb/tree/main/.opencode/skills/redmuffin-standards/rm-guide-testing
Command: npx skills add https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb --skill rm-guide-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the guesswork from TUnit test creation by enforcing consistent fluent assertions, helper file placement, and naming patterns so reviews focus on behavior rather than conventions.

Core Features & Use Cases

  • Fluent assertions: Reminds you to use TUnit's built-in Assert.That(...) style to keep validation expressive and reliable.
  • Naming conventions: Encourages naming test doubles as [Class]_[Type] and placing helpers in [TestClass].Helpers.cs partial files for discoverability.
  • Shared setup: Promotes using TestScope when setting up fixtures so integration helpers remain isolated yet reusable.
  • Use Case: When adding a new API integration test, rely on this Skill to guide naming the mock as ApiClient_Spy, placing helpers near the test class, and wrapping setup in a TestScope helper.

Quick Start

Apply rm-guide-testing when writing or reviewing TUnit tests to reinforce fluent assertion usage, test double naming, and helper placement.

Frequently Asked Questions about rm-guide-testing

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

FAQPage Schema
How do I enforce naming conventions for TUnit test doubles and helpers?

TUnit test doubles should be named using the [Class]_[Type] pattern, and helpers must be placed in [TestClass].Helpers.cs partial files. This ensures test suites remain discoverable and consistent during reviews.

What's the best way to structure shared setup in TUnit tests?

Use TestScope when setting up fixtures in TUnit tests. TestScope isolates integration helpers while keeping them reusable across your test suite, maintaining consistent shared setup.

Why use fluent assertions in TUnit test suites?

Fluent assertions using TUnit's built-in Assert.That(...) style keep validation expressive and reliable. They remove guesswork by making test behavior clear and readable during reviews.

Do I need partial files when organizing TUnit test helpers?

Yes, helpers should be placed in [TestClass].Helpers.cs partial files. This placement keeps helper logic near the test class for discoverability and maintains suite consistency.

Can I use this testing guide for API integration tests?

Yes, when adding API integration tests, the guide helps name mocks like ApiClient_Spy, place helpers near the test class, and wrap setup in a TestScope helper for isolation.