1 /*** 2 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 */ 4 package test.net.sourceforge.pmd.rules; 5 6 import net.sourceforge.pmd.rules.ClassNamingConventions; 7 import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst; 8 import test.net.sourceforge.pmd.testframework.TestDescriptor; 9 10 public class ClassNamingConventionsTest extends SimpleAggregatorTst { 11 12 public void testAll() { 13 runTests(new TestDescriptor[]{ 14 new TestDescriptor(TEST1, "class names should not start with lowercase character", 1, new ClassNamingConventions()), 15 new TestDescriptor(TEST2, "all is well", 0, new ClassNamingConventions()), 16 }); 17 } 18 19 private static final String TEST1 = 20 "public class foo {};"; 21 22 private static final String TEST2 = 23 "public class FooBar {};"; 24 25 }