All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.pmd.rules.pmd-unit-tests.TestClassWithoutTestCases.html Maven / Gradle / Ivy

Go to download

PMD is a tool that looks for potential problems like possible bugs, dead code, suboptimal code, overcomplicated expressions or duplicate code.

There is a newer version: 2.4
Show newest version
Test classes end with the suffix Test. Having a non-test class with that name is not a good practice, since most people will assume it is a test case. Test classes have test methods named testXXX.
Beware: This rule doesn't support JUnit 4.x's @Test annotation.
public class CarTest { // violation, consider changing the name of the class if it is not a test
  // consider adding test methods if it is a test
  public static void main(String[] args) {
    // do something
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy