1 package net.sourceforge.pmd.lang.java.rule.strings;
2
3 import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
4
5 import org.junit.Before;
6
7
8 public class StringsRulesTest extends SimpleAggregatorTst {
9
10 private static final String RULESET = "java-strings";
11
12 @Before
13 public void setUp() {
14 addRule(RULESET, "AppendCharacterWithChar");
15 addRule(RULESET, "AvoidStringBufferField");
16 addRule(RULESET, "ConsecutiveAppendsShouldReuse");
17 addRule(RULESET, "ConsecutiveLiteralAppends");
18 addRule(RULESET, "InefficientEmptyStringCheck");
19 addRule(RULESET, "InefficientStringBuffering");
20 addRule(RULESET, "InsufficientStringBufferDeclaration");
21 addRule(RULESET, "StringBufferInstantiationWithChar");
22 addRule(RULESET, "StringInstantiation");
23 addRule(RULESET, "StringToString");
24 addRule(RULESET, "UnnecessaryCaseChange");
25 addRule(RULESET, "UseEqualsToCompareStrings");
26 addRule(RULESET, "UseIndexOfChar");
27 addRule(RULESET, "UselessStringValueOf");
28 addRule(RULESET, "UseStringBufferLength");
29 }
30
31 public static junit.framework.Test suite() {
32 return new junit.framework.JUnit4TestAdapter(StringsRulesTest.class);
33 }
34 }