01: package test.net.sourceforge.pmd.rules.optimizations;
02:
03: import org.junit.Before;
04:
05: import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst;
06:
07: public class OptimizationsRulesTest extends SimpleAggregatorTst {
08:
09: @Before
10: public void setUp() {
11: addRule("optimizations", "AddEmptyString");
12: addRule("optimizations", "AvoidArrayLoops");
13: addRule("optimizations", "AvoidInstantiatingObjectsInLoops");
14: addRule("optimizations", "LocalVariableCouldBeFinal");
15: addRule("optimizations", "MethodArgumentCouldBeFinal");
16: addRule("optimizations", "SimplifyStartsWith");
17: addRule("optimizations", "UnnecessaryWrapperObjectCreation");
18: addRule("optimizations", "UseArrayListInsteadOfVector");
19: addRule("optimizations", "UseArraysAsList");
20: addRule("optimizations", "UseStringBufferForStringAppends");
21: }
22:
23: public static junit.framework.Test suite() {
24: return new junit.framework.JUnit4TestAdapter(
25: OptimizationsRulesTest.class);
26: }
27: }
|