1 package com.puppycrawl.tools.checkstyle.checks.modifier; 2 3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; 4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration; 5 import com.puppycrawl.tools.checkstyle.checks.modifier.RedundantModifierCheck; 6 7 public class RedundantModifierTest 8 extends BaseCheckTestCase 9 { 10 public void testIt() 11 throws Exception 12 { 13 final DefaultConfiguration checkConfig = 14 createCheckConfig(RedundantModifierCheck.class); 15 final String [] expected = { 16 "57:9: Redundant 'public' modifier.", 17 "63:9: Redundant 'abstract' modifier.", 18 "66:9: Redundant 'public' modifier.", 19 "72:9: Redundant 'final' modifier.", 21 "79:13: Redundant 'final' modifier.", 22 "88:12: Redundant 'final' modifier.", 23 "116:5: Redundant 'public' modifier.", 24 "117:5: Redundant 'final' modifier.", 25 "118:5: Redundant 'static' modifier.", 26 "120:5: Redundant 'public' modifier.", 27 "121:5: Redundant 'abstract' modifier.", 28 }; 29 verify(checkConfig, getPath("InputModifier.java"), expected); 30 } 31 } 32 | Popular Tags |