01: package test.net.sourceforge.pmd.rules.basic;
02:
03: import org.junit.Before;
04:
05: import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst;
06:
07: public class BasicRulesTest extends SimpleAggregatorTst {
08:
09: @Before
10: public void setUp() {
11: addRule("basic", "AvoidDecimalLiteralsInBigDecimalConstructor");
12: addRule("basic", "AvoidMultipleUnaryOperators");
13: addRule("basic", "AvoidThreadGroup");
14: addRule("basic", "AvoidUsingHardCodedIP");
15: addRule("basic", "AvoidUsingOctalValues");
16: addRule("basic", "BigIntegerInstantiation");
17: addRule("basic", "BooleanInstantiation");
18: addRule("basic", "BrokenNullCheck");
19: addRule("basic", "CheckResultSet");
20: addRule("basic", "ClassCastExceptionWithToArray");
21: addRule("basic", "CollapsibleIfStatements");
22: addRule("basic", "DoubleCheckedLocking");
23: addRule("basic", "EmptyCatchBlock");
24: addRule("basic", "EmptyFinallyBlock");
25: addRule("basic", "EmptyIfStmt");
26: addRule("basic", "EmptyStatementNotInLoop");
27: addRule("basic", "EmptyStaticInitializer");
28: addRule("basic", "EmptySwitchStatements");
29: addRule("basic", "EmptySynchronizedBlock");
30: addRule("basic", "EmptyTryBlock");
31: addRule("basic", "EmptyWhileStmt");
32: addRule("basic", "ForLoopShouldBeWhileLoop");
33: addRule("basic", "JumbledIncrementer");
34: addRule("basic", "MisplacedNullCheck");
35: addRule("basic", "OverrideBothEqualsAndHashcode");
36: addRule("basic", "ReturnFromFinallyBlock");
37: addRule("basic", "UnconditionalIfStatement");
38: addRule("basic", "UnnecessaryFinalModifier");
39: addRule("basic", "UnnecessaryReturn");
40: addRule("basic", "UnnecessaryConversionTemporary");
41: addRule("basic", "UselessOperationOnImmutable");
42: addRule("basic", "UselessOverridingMethod");
43: }
44:
45: public static junit.framework.Test suite() {
46: return new junit.framework.JUnit4TestAdapter(
47: BasicRulesTest.class);
48: }
49: }
|