KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > checks > j2ee > LocalHomeInterfaceCheckTest


1 package com.puppycrawl.tools.checkstyle.checks.j2ee;
2 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
3 import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
4 import com.puppycrawl.tools.checkstyle.checks.j2ee.LocalHomeInterfaceCheck;
5
6 public class LocalHomeInterfaceCheckTest extends BaseCheckTestCase
7 {
8     public void testDefault()
9             throws Exception JavaDoc
10     {
11         final DefaultConfiguration checkConfig =
12             createCheckConfig(LocalHomeInterfaceCheck.class);
13         final String JavaDoc[] expected = {
14             "17:19: Method 'createSomething' must be non-void.",
15             "17:19: Method 'createSomething' must throw 'javax.ejb.CreateException'.",
16             "24:17: Method 'method' must not throw 'java.rmi.RemoteException'.",
17         };
18         verify(checkConfig, getPath("j2ee/InputLocalHomeInterface.java"), expected);
19     }
20 }
21
Popular Tags