StrictExceptionRulesTest.java :  » Code-Analyzer » pmd-4.2rc1 » test » net » sourceforge » pmd » rules » strictexception » Java Open Source

Java Open Source » Code Analyzer » pmd 4.2rc1 
pmd 4.2rc1 » test » net » sourceforge » pmd » rules » strictexception » StrictExceptionRulesTest.java
package test.net.sourceforge.pmd.rules.strictexception;

import org.junit.Before;

import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst;

public class StrictExceptionRulesTest extends SimpleAggregatorTst {

    @Before
    public void setUp() {
        addRule("strictexception", "AvoidCatchingNPE");
        addRule("strictexception", "AvoidCatchingThrowable");
        addRule("strictexception", "AvoidRethrowingException");
        addRule("strictexception", "AvoidThrowingNullPointerException");
        addRule("strictexception", "AvoidThrowingRawExceptionTypes");
        addRule("strictexception", "DoNotExtendJavaLangError");
        addRule("strictexception", "ExceptionAsFlowControl");
        addRule("strictexception", "SignatureDeclareThrowsException");
        addRule("strictexception", "DoNotThrowExceptionInFinally");
    }

    public static junit.framework.Test suite() {
        return new junit.framework.JUnit4TestAdapter(StrictExceptionRulesTest.class);
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.