Shared naming conventions allow teams to collaborate efficiently. This rule raises an issue when a test class name does not match the provided
regular expression.
Noncompliant code example
With the default value: ^((Test|IT)[a-zA-Z0-9_]+|[A-Z][a-zA-Z0-9_]*(Test|Tests|TestCase|IT|ITCase))$
class Foo { // Noncompliant
@Test
void check() { }
}
class Bar { // Noncompliant
@Nested
class PositiveCase {
@Test
void check() { }
}
}
Compliant solution
class FooTest {
@Test
void check() { }
}
class BarIT {
@Nested
class PositiveCase {
@Test
void check() { }
}
}