[java] Split the rule tests for documentation
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.java.rule.documentation;
|
||||
|
||||
public class CommentContentTest extends DocumentationRulesTest {
|
||||
// no additional unit tests
|
||||
}
|
@ -15,8 +15,7 @@ import org.junit.Test;
|
||||
import net.sourceforge.pmd.Rule;
|
||||
import net.sourceforge.pmd.properties.PropertyDescriptor;
|
||||
|
||||
public class CommentRequiredRuleTest {
|
||||
|
||||
public class CommentRequiredTest extends DocumentationRulesTest {
|
||||
@Test
|
||||
public void allCommentTypesIgnored() {
|
||||
CommentRequiredRule rule = new CommentRequiredRule();
|
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.java.rule.documentation;
|
||||
|
||||
public class CommentSizeTest extends DocumentationRulesTest {
|
||||
// no additional unit tests
|
||||
}
|
@ -9,17 +9,12 @@ import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
|
||||
/**
|
||||
* Rule tests for the documentation category
|
||||
*/
|
||||
public class DocumentationRulesTest extends SimpleAggregatorTst {
|
||||
public abstract class DocumentationRulesTest extends SimpleAggregatorTst {
|
||||
|
||||
private static final String RULESET = "category/java/documentation.xml";
|
||||
|
||||
@Override
|
||||
public void setUp() {
|
||||
addRule(RULESET, "CommentContent");
|
||||
addRule(RULESET, "CommentRequired");
|
||||
addRule(RULESET, "CommentSize");
|
||||
addRule(RULESET, "UncommentedEmptyConstructor");
|
||||
addRule(RULESET, "UncommentedEmptyMethodBody");
|
||||
addRule(RULESET, getClass().getSimpleName().replaceFirst("Test$", ""));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.java.rule.documentation;
|
||||
|
||||
public class UncommentedEmptyConstructorTest extends DocumentationRulesTest {
|
||||
// no additional unit tests
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.java.rule.documentation;
|
||||
|
||||
public class UncommentedEmptyMethodBodyTest extends DocumentationRulesTest {
|
||||
// no additional unit tests
|
||||
}
|
Reference in New Issue
Block a user