View Javadoc

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, "ConsecutiveLiteralAppends");
17          addRule(RULESET, "InefficientEmptyStringCheck");
18          addRule(RULESET, "InefficientStringBuffering");
19          addRule(RULESET, "InsufficientStringBufferDeclaration");
20          addRule(RULESET, "StringBufferInstantiationWithChar");
21          addRule(RULESET, "StringInstantiation");
22          addRule(RULESET, "StringToString");
23          addRule(RULESET, "UnnecessaryCaseChange");
24          addRule(RULESET, "UseEqualsToCompareStrings");
25          addRule(RULESET, "UseIndexOfChar");
26          addRule(RULESET, "UselessStringValueOf");
27          addRule(RULESET, "UseStringBufferLength");
28      }
29  
30      public static junit.framework.Test suite() {
31          return new junit.framework.JUnit4TestAdapter(StringsRulesTest.class);
32      }
33  }