2023-05-25 14:18:12 +02:00
|
|
|
== Why is this an issue?
|
|
|
|
|
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
|
|
|
|
With the default value: ``++^((Test|IT)[a-zA-Z0-9_]+|[A-Z][a-zA-Z0-9_]*(Test|Tests|TestCase|IT|ITCase))$++``
|
|
|
|
|
|
|
|
[source,java]
|
|
|
|
----
|
|
|
|
class Foo { // Noncompliant
|
|
|
|
@Test
|
|
|
|
void check() { }
|
|
|
|
}
|
|
|
|
|
|
|
|
class Bar { // Noncompliant
|
|
|
|
@Nested
|
|
|
|
class PositiveCase {
|
|
|
|
@Test
|
|
|
|
void check() { }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
|
|
|
|
[source,java]
|
|
|
|
----
|
|
|
|
class FooTest {
|
|
|
|
@Test
|
|
|
|
void check() { }
|
|
|
|
}
|
|
|
|
|
|
|
|
class BarIT {
|
|
|
|
@Nested
|
|
|
|
class PositiveCase {
|
|
|
|
@Test
|
|
|
|
void check() { }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2021-09-20 15:38:42 +02:00
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::../message.adoc[]
|
|
|
|
|
|
|
|
include::../parameters.adoc[]
|
|
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|