KickJava   Java API By Example, From Geeks To Geeks.

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


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.RemoteHomeInterfaceCheck;
5
6 public class RemoteHomeInterfaceCheckTest extends BaseCheckTestCase
7 {
8     public void testDefault()
9             throws Exception JavaDoc
10     {
11         final DefaultConfiguration checkConfig =
12             createCheckConfig(RemoteHomeInterfaceCheck.class);
13         final String JavaDoc[] expected = {
14             "20:19: Method 'createSomething' must be non-void.",
15             "20:19: Method 'createSomething' must throw 'java.rmi.RemoteException'.",
16             "20:19: Method 'createSomething' must throw 'javax.ejb.CreateException'.",
17             "22:19: Method 'findSomething' must throw 'java.rmi.RemoteException'.",
18         };
19         verify(checkConfig, getPath("j2ee/InputRemoteHomeInterface.java"), expected);
20     }
21 }
22
Popular Tags