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.unnecessary;
5   
6   import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
7   
8   import org.junit.Before;
9   
10  
11  public class UnnecessaryRulesTest extends SimpleAggregatorTst {
12      
13      private static final String RULESET = "java-unnecessary";
14  
15      @Before
16      public void setUp() {
17          addRule(RULESET, "UnnecessaryConversionTemporary");
18          addRule(RULESET, "UnnecessaryReturn");
19          addRule(RULESET, "UnnecessaryFinalModifier");
20          addRule(RULESET, "UnusedNullCheckInEquals");
21          addRule(RULESET, "UselessOverridingMethod");
22          addRule(RULESET, "UselessOperationOnImmutable");
23          addRule(RULESET, "UselessParentheses");
24      }
25  
26      public static junit.framework.Test suite() {
27          return new junit.framework.JUnit4TestAdapter(UnnecessaryRulesTest.class);
28      }
29  }