From: David Gageot Date: Wed, 2 May 2012 12:57:14 +0000 (+0200) Subject: TestClassWithoutTestCases supports only JUnit 3.x X-Git-Tag: 3.1~312 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c212266913c0d8c41e35461204ae3686e1d7fedc;p=sonarqube.git TestClassWithoutTestCases supports only JUnit 3.x --- diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/pmd.properties b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/pmd.properties index 167b7897d1e..af3beb3b70a 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/pmd.properties +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/pmd.properties @@ -279,7 +279,7 @@ rule.pmd-unit-tests.JUnitStaticSuite.name=JUnit static suite rule.pmd-unit-tests.JUnitSpelling.name= JUnit spelling rule.pmd-unit-tests.JUnitAssertionsShouldIncludeMessage.name=JUnit assertions should include a message rule.pmd-unit-tests.JUnitTestsShouldIncludeAssert.name=JUnit tests should include an assert -rule.pmd-unit-tests.TestClassWithoutTestCases.name=Test class without test cases +rule.pmd-unit-tests.TestClassWithoutTestCases.name=Test class without test cases (JUnit 3.x only) rule.pmd-unit-tests.UnnecessaryBooleanAssertion.name=Unnecessary boolean assertion rule.pmd-unit-tests.UseAssertEqualsInsteadOfAssertTrue.name=Use assertEquals instead of assertTrue rule.pmd-unit-tests.UseAssertSameInsteadOfAssertTrue.name=Use assertSame instead of assertTrue diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/pmd/rules/pmd-unit-tests/TestClassWithoutTestCases.html b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/pmd/rules/pmd-unit-tests/TestClassWithoutTestCases.html index 891dde75b7f..25a0699331c 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/pmd/rules/pmd-unit-tests/TestClassWithoutTestCases.html +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/pmd/rules/pmd-unit-tests/TestClassWithoutTestCases.html @@ -1,4 +1,5 @@ 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