What problem does it solve?
Prevents inconsistent, flaky, or hard-to-read C# unit tests by prescribing a clear structure, naming, and assertion practices so test suites are reliable and maintainable.
Core Features & Use Cases
- Test Structure & Naming: Requires [Test] attribute for single-case tests, strict Arrange-Act-Assert spacing without inline block comments, and method names in the UnitOfWork_StateUnderTest_ExpectedBehavior format.
- Data-Driven Tests: Mandates TestCase for inline data, TestCaseSource for complex objects, and Values/Random for combinatorial scenarios to reduce duplication.
- Assertions & Exceptions: Standardizes Assert.That for equality, Assert.Throws/Assert.ThrowsAsync for exception validation, CollectionAssert/StringAssert for collections and strings, and recommends FluentAssertions if preferred by the project.
- Isolation & Async: Encourages NSubstitute for mocking, independent idempotent tests that can run in parallel, and async methods to return Task with proper async setup/teardown support.
Quick Start
Create an NUnit test named Calculate_InvalidInput_ThrowsArgumentException that follows Arrange-Act-Assert, uses TestCase for data-driven inputs, mocks dependencies with NSubstitute, and verifies the exception with Assert.Throws.