View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.java.rule.empty;
5   
6   import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
7   
8   import org.junit.Before;
9   
10  
11  public class EmptyRulesTest extends SimpleAggregatorTst {
12      
13      private static final String RULESET = "java-empty";
14  
15      @Before
16      public void setUp() {
17          addRule(RULESET, "EmptyCatchBlock");
18          addRule(RULESET, "EmptyFinallyBlock");
19          addRule(RULESET, "EmptyIfStmt");
20          addRule(RULESET, "EmptyInitializer");
21          addRule(RULESET, "EmptyStatementBlock");
22          addRule(RULESET, "EmptyStatementNotInLoop");
23          addRule(RULESET, "EmptyStaticInitializer");
24          addRule(RULESET, "EmptySwitchStatements");
25          addRule(RULESET, "EmptySynchronizedBlock");
26          addRule(RULESET, "EmptyTryBlock");
27          addRule(RULESET, "EmptyWhileStmt");
28      }
29  
30      public static junit.framework.Test suite() {
31          return new junit.framework.JUnit4TestAdapter(EmptyRulesTest.class);
32      }
33  }