View Javadoc

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