KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > checks > coding > DefaultComesLastCheckTest


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 JavaDoc;
7
8 public class DefaultComesLastCheckTest extends BaseCheckTestCase
9 {
10     public void testIt() throws Exception JavaDoc
11     {
12         final DefaultConfiguration checkConfig =
13             createCheckConfig(DefaultComesLastCheck.class);
14         final String JavaDoc[] expected = {
15             "22:9: Default should be last label in the switch."
16         };
17         verify(checkConfig,
18                getPath("coding" + File.separator + "InputDefaultComesLast.java"),
19                expected);
20     }
21 }
22
Popular Tags