KickJava   Java API By Example, From Geeks To Geeks.

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


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 import java.io.File JavaDoc;
7
8 public class MutableExceptionCheckTest extends BaseCheckTestCase {
9     public void test() throws Exception JavaDoc {
10         DefaultConfiguration checkConfig = createCheckConfig(MutableExceptionCheck.class);
11
12         String JavaDoc[] expected = {
13             "6:9: The field '_errorCode' must be declared final.",
14             "23:9: The field '_errorCode' must be declared final.",
15         };
16
17         verify(checkConfig, getPath("design" + File.separator + "InputMutableException.java"), expected);
18     }
19 }
20
Popular Tags