1 package com.puppycrawl.tools.checkstyle.bcel.checks; 2 3 import com.puppycrawl.tools.checkstyle.DefaultConfiguration; 4 import com.puppycrawl.tools.checkstyle.bcel.BcelCheckTestCase; 5 6 public class HiddenStaticMethodTest 7 extends BcelCheckTestCase 8 { 9 public void testIt() 10 throws Exception 11 { 12 final DefaultConfiguration checkConfig = 13 createCheckConfig(HiddenStaticMethodCheck.class); 14 15 final String [] expected = { 16 "0: Static method 'public static int staticMethod()' hides method in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.", 17 "0: Static method 'public static int staticMethodSameParamName(int i)' hides method in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.", 18 "0: Static method 'public static int staticMethodSameParamType(int x)' hides method in class 'com.puppycrawl.tools.checkstyle.bcel.checks.SuperClass'.", 19 }; 20 verify(checkConfig, getPath("com\\puppycrawl\\tools\\checkstyle\\bcel\\checks\\SubClass.class"), expected); 21 } 22 } 23 | Popular Tags |