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 import java.io.File ; 7 8 public class PackageDeclarationCheckTest extends BaseCheckTestCase 9 { 10 public void testDefault() throws Exception 11 { 12 DefaultConfiguration checkConfig = createCheckConfig(PackageDeclarationCheck.class); 13 14 String [] expected = { 15 "4: Missing package declaration.", 16 }; 17 18 verify(checkConfig, getPath("coding" + File.separator + "InputNoPackage.java"), expected); 19 } 20 21 public void testDefault1() throws Exception 22 { 23 DefaultConfiguration checkConfig = createCheckConfig(PackageDeclarationCheck.class); 24 25 String [] expected = { 26 }; 27 28 verify(checkConfig, getPath("coding" + File.separator + "InputIllegalCatchCheck.java"), expected); 29 } 30 } 31 | Popular Tags |