Skip to content

[apex] ApexUnitTestMethodShouldHaveIsTestAnnotation is asking for IsTest annotation for a TestSetup method #3282

Answered by adangel
Kamilsz asked this question in Q&A
Discussion options

You must be logged in to vote

This is probably a false-positive of the rule ApexUnitTestMethodShouldHaveIsTestAnnotation.
The current rule impl looks for Assert statement, which it found it your setup() method - hence it thinks, this must be a test method.

That's a similar case like in #3183 which will probably be fixed with the next PMD version.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by adangel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants