| name | test-naming-convention |
| description | Guidelines for naming test folders and namespaces following the Unit.[Component] convention. |
Test Naming Convention (BackEnd)
Overview
To maintain a clean and standardized test suite, all unit tests must follow a specific directory and namespace structure.
Folder Naming
Test subdirectories within the Tests/ project must use the Unit. prefix followed by the component name being tested.
- Correct:
Tests/Unit.Services/, Tests/Unit.Data/, Tests/Unit.ApiClient/
- Incorrect:
Tests/Services/, Tests/Data/, Tests/Repositories/
Namespace Naming
The namespace of each test file must mirror the folder structure exactly.
File Naming
- Each source file must have EXACTLY one corresponding test file.
- Pattern:
[ClassName]Tests.cs
- Example:
PersonaService.cs -> PersonaServiceTests.cs
Project Mirroring
The structure inside Tests/Unit.[Category] should mirror the structure of the source project (e.g., matching subfolders for sub-namespaces).