1 package test.net.sourceforge.pmd.rules.strings; 2 3 import org.junit.Before; 4 5 import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst; 6 7 public class StringsRulesTest extends SimpleAggregatorTst { 8 9 @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(StringsRulesTest.class); 29 } 30 }