What problem does it solve?
This Skill provides comprehensive guidance on leveraging TUnit for writing effective, data-driven unit tests in C#, ensuring code quality and reliability.
Core Features & Use Cases
- Best Practices: Learn optimal project setup, test structure, and naming conventions.
- Data-Driven Testing: Implement inline, method-based, and class-based data-driven tests.
- Assertions: Utilize a rich set of fluent, asynchronous assertions for precise validation.
- Lifecycle Hooks: Master setup and teardown across different scopes (test, class, assembly, session).
- Advanced Features: Explore retries, parallel execution, skipping, and timeouts.
- Use Case: Refactor existing xUnit tests to TUnit, benefiting from its advanced features and improved assertion syntax for more maintainable and expressive test suites.
Quick Start
Follow the TUnit best practices to write a new data-driven unit test for a C# method.