JUnit4TestShouldUseTestAnnotation for private method
A source code analyzer
Brought to you by:
adangel,
juansotuyo
JUnit4TestShouldUseTestAnnotation is given for a private method that starts with "test". AFAIK only public methods (that return void?) can be called by JUnit, so perhaps the check could verify at least that the method is public?
I'm Using PMD 5.1.1 via Eclipse plugin 4.0.3 4.0.3.v20140427-0831
public class Faa { @Test public void test() { testHelper(); fail( "Not yet implemented" ); } private boolean testHelper() // <- JUnit4TestShouldUseTestAnnotation { return false; } }
Will be fixed with the next version.