1 package test.net.sourceforge.pmd.rules.strictexception;
2
3 import org.junit.Before;
4
5 import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst;
6
7 public class StrictExceptionRulesTest extends SimpleAggregatorTst {
8
9 @Before
10 public void setUp() {
11 addRule("strictexception", "AvoidCatchingNPE");
12 addRule("strictexception", "AvoidCatchingThrowable");
13 addRule("strictexception", "AvoidRethrowingException");
14 addRule("strictexception", "AvoidThrowingNewInstanceOfSameException");
15 addRule("strictexception", "AvoidThrowingNullPointerException");
16 addRule("strictexception", "AvoidThrowingRawExceptionTypes");
17 addRule("strictexception", "DoNotExtendJavaLangError");
18 addRule("strictexception", "ExceptionAsFlowControl");
19 addRule("strictexception", "SignatureDeclareThrowsException");
20 addRule("strictexception", "DoNotThrowExceptionInFinally");
21 }
22
23 public static junit.framework.Test suite() {
24 return new junit.framework.JUnit4TestAdapter(StrictExceptionRulesTest.class);
25 }
26 }