View Javadoc

    1   package net.sourceforge.pmd.lang.java.rule.imports;
    2
    3   import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
    4
    5   import org.junit.Before;
    6
    7
    8   public class ImportsRulesTest extends SimpleAggregatorTst {
    9
    10      private static final String RULESET = "java-imports";
    11
    12      @Before
    13      public void setUp() {
    14          addRule(RULESET, "DontImportJavaLang");
    15          addRule(RULESET, "DuplicateImports");
    16          addRule(RULESET, "ImportFromSamePackage");
    17          addRule(RULESET, "TooManyStaticImports");
    18          addRule(RULESET, "UnnecessaryFullyQualifiedName");
    19          addRule(RULESET, "UnusedImports");
    20      }
    21
    22      public static junit.framework.Test suite() {
    23          return new junit.framework.JUnit4TestAdapter(ImportsRulesTest.class);
    24      }
    25  }