run-unit-tests
Run unit tests for the API Service and Analyzers. Use this to verify business logic, individual components, and code analyzers.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
To verify the logic, endpoints, and custom analyzers of the API Service:
-
Run Service Unit Tests
- Navigate to
tests/ApiService/BookStore.ApiService.UnitTests. - Run:
dotnet test - Purpose: Verifies handlers, validation, and domain logic.
- Navigate to
-
Run Analyzer Unit Tests
- Navigate to
tests/ApiService/BookStore.ApiService.Analyzers.UnitTests. - Run:
dotnet test - Purpose: Verifies custom Roslyn analyzers (e.g., UUIDv7 enforcement).
- Navigate to
// turbo 3. Both (shortcut)
- To run both test suites in one command:
dotnet test tests/ApiService/BookStore.ApiService.UnitTests/BookStore.ApiService.UnitTests.csproj && \ dotnet test tests/ApiService/BookStore.ApiService.Analyzers.UnitTests/BookStore.ApiService.Analyzers.UnitTests.csproj
-
Analyze Results
- Pass: Core logic and static analysis rules are correct.
-
Fail:
- Check the specific failing test and project.
- Analyzer tests often fail if code samples in tests don't match expected diagnostics.
Related Skills
Used By:
-
/verify-feature- Runs all tests including these unit tests
Related:
-
/run-integration-tests- Run full integration test suite -
/verify-feature- Complete verification (build + format + all tests)
See Also:
- testing-guide - TUnit testing patterns
- ApiService.UnitTests AGENTS.md - Unit test patterns
- Analyzers.UnitTests AGENTS.md - Analyzer testing patterns
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!