1 package com.puppycrawl.tools.checkstyle.checks.coding; 2 3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; 4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration; 5 6 public class MissingSwitchDefaultCheckTest 7 extends BaseCheckTestCase 8 { 9 private DefaultConfiguration mCheckConfig; 10 11 public void setUp() 12 { 13 mCheckConfig = createCheckConfig(MissingSwitchDefaultCheck.class); 14 } 15 16 public void testMissingSwitchDefault() throws Exception 17 { 18 final String [] expected = { 19 "15:9: switch without \"default\" clause.", 20 }; 21 verify( 22 mCheckConfig, 23 getPath("InputMissingSwitchDefault.java"), 24 expected); 25 } 26 } 27 | Popular Tags |