Do you suffix unit test classes with "Tests"?

Updated by Brook Jeynes [SSW] 1 year ago. See history

123

Unit test classes should be suffixed with the word "Tests" for better coding readability.

[TestFixture] public class SqlValidatorReportTest { }

❌ Figure: Bad example - Unit test class is not suffixed with "Tests"

[TestFixture] public class HtmlDocumentTests { }

✅ Figure: Good example - Unit test class is suffixed with "Tests"

We have a program called SSW Code Auditor to check for this rule.

acknowledgements
related rules