[apex] ApexUnitTestClassShouldHaveRunAsRule - remove unnecessary constructor

This commit is contained in:
Andreas Dangel
2022-10-14 16:57:47 +02:00
parent a88ad1cd5d
commit df2d1b806e

View File

@ -6,7 +6,6 @@ package net.sourceforge.pmd.lang.apex.rule.bestpractices;
import java.util.List;
import net.sourceforge.pmd.RulePriority;
import net.sourceforge.pmd.lang.apex.ast.ASTMethod;
import net.sourceforge.pmd.lang.apex.ast.ASTRunAsBlockStatement;
import net.sourceforge.pmd.lang.apex.ast.ApexNode;
@ -19,12 +18,6 @@ import net.sourceforge.pmd.lang.apex.rule.AbstractApexUnitTestRule;
*/
public class ApexUnitTestClassShouldHaveRunAsRule extends AbstractApexUnitTestRule {
public ApexUnitTestClassShouldHaveRunAsRule() {
setName("ApexUnitTestClassShouldHaveRunAsRule");
setMessage("Apex unit test classes should have at least one System.runAs() call");
setPriority(RulePriority.MEDIUM);
}
@Override
public Object visit(ASTMethod node, Object data) {
if (!isTestMethodOrClass(node)) {