01: package test.net.sourceforge.pmd.rules.strings;
02:
03: import org.junit.Before;
04:
05: import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst;
06:
07: public class StringsRulesTest extends SimpleAggregatorTst {
08:
09: @Before
10: public void setUp() {
11: addRule("strings", "AppendCharacterWithChar");
12: addRule("strings", "AvoidStringBufferField");
13: addRule("strings", "ConsecutiveLiteralAppends");
14: addRule("strings", "InefficientEmptyStringCheck");
15: addRule("strings", "InefficientStringBuffering");
16: addRule("strings", "InsufficientStringBufferDeclaration");
17: addRule("strings", "StringBufferInstantiationWithChar");
18: addRule("strings", "StringInstantiation");
19: addRule("strings", "StringToString");
20: addRule("strings", "UnnecessaryCaseChange");
21: addRule("strings", "UseEqualsToCompareStrings");
22: addRule("strings", "UseIndexOfChar");
23: addRule("strings", "UselessStringValueOf");
24: addRule("strings", "UseStringBufferLength");
25: }
26:
27: public static junit.framework.Test suite() {
28: return new junit.framework.JUnit4TestAdapter(
29: StringsRulesTest.class);
30: }
31: }
|