KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > checks > design > InterfaceIsTypeCheckTest


1 package com.puppycrawl.tools.checkstyle.checks.design;
2
3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
5
6 public class InterfaceIsTypeCheckTest
7     extends BaseCheckTestCase
8 {
9     public void testDefault()
10         throws Exception JavaDoc
11     {
12         final DefaultConfiguration checkConfig =
13             createCheckConfig(InterfaceIsTypeCheck.class);
14         final String JavaDoc[] expected = {
15             "25: interfaces should describe a type and hence have methods.",
16         };
17         verify(checkConfig, getPath("InputInterfaceIsType.java"), expected);
18     }
19
20     public void testAllowMarker()
21         throws Exception JavaDoc
22     {
23         final DefaultConfiguration checkConfig =
24             createCheckConfig(InterfaceIsTypeCheck.class);
25         checkConfig.addAttribute("allowMarkerInterfaces", "false");
26         final String JavaDoc[] expected = {
27             "20: interfaces should describe a type and hence have methods.",
28             "25: interfaces should describe a type and hence have methods.",
29         };
30         verify(checkConfig, getPath("InputInterfaceIsType.java"), expected);
31     }
32
33 }
34
Popular Tags