01: package test.net.sourceforge.pmd.rules.strictexception;
02:
03: import org.junit.Before;
04:
05: import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst;
06:
07: public class StrictExceptionRulesTest extends SimpleAggregatorTst {
08:
09: @Before
10: public void setUp() {
11: addRule("strictexception", "AvoidCatchingNPE");
12: addRule("strictexception", "AvoidCatchingThrowable");
13: addRule("strictexception", "AvoidRethrowingException");
14: addRule("strictexception", "AvoidThrowingNullPointerException");
15: addRule("strictexception", "AvoidThrowingRawExceptionTypes");
16: addRule("strictexception", "DoNotExtendJavaLangError");
17: addRule("strictexception", "ExceptionAsFlowControl");
18: addRule("strictexception", "SignatureDeclareThrowsException");
19: addRule("strictexception", "DoNotThrowExceptionInFinally");
20: }
21:
22: public static junit.framework.Test suite() {
23: return new junit.framework.JUnit4TestAdapter(
24: StrictExceptionRulesTest.class);
25: }
26: }
|