rspec/rules/S3577/java/rule.adoc

55 lines
761 B
Plaintext
Raw Normal View History

== 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() { }
}
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]