@RegisterExtension
that have the wrong type or are not declared as static when it is required@Nested
@MethodSource
that has an unknown, non-static or no-arg target@ValueSource
or @EnumSource
values@Test
, @ParameterizedTest
or @RepeatedTest
setup()
or tearDown()
methods that are not public, whose return type is not void or take argumentssuite()
methods that are private, take arguments or are not static@BeforeClass
, @AfterClass
, @BeforeAll
or @AfterAll
that are
not public, not static, whose return type is not void or do not have a valid parameter list
@Before
, @After
, @BeforeEach
or @AfterEach
that are
not public, whose return type is not void or take arguments
RepetitionInfo
in @BeforeAll
or @AfterAll
methodsRepetitionInfo
in @BeforeEach
or @AfterEach
methods that are used by @Test
annotated tests
@DataPoint
or @DataPoints
that are not public or not static@Rule
that are not public or not a subtype of TestRule
or
MethodRule
@ClassRule
that are not public, not static or not a subtype of TestRule
TestCase
with a test
prefix that are not public, whose return type is not void, take
arguments or are static
@Test
that are not public, whose return type is not void, take arguments or are static
Malformed @Before
method example (Java):
@Before private int foo(int arg) { ... }
After the quick-fix is applied:
@Before public void foo() { ... }
Missing method source example (Kotlin):
class Example {
@MethodSource("parameters")
@ParameterizedTest
fun foo(param: String) { ... }
}
After the quick-fix is applied:
class Example {
@MethodSource("parameters")
@ParameterizedTest
fun foo(param: String) { ... }
companion object {
@JvmStatic
fun parameters(): Stream<Arguments> {
TODO("Not yet implemented")
}
}
}
Use the inspection options to specify annotations. Any parameter annotated with one of these annotations will not be reported.