01: package com.puppycrawl.tools.checkstyle.checks.design;
02:
03: import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
04: import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
05:
06: import java.io.File;
07:
08: public class MutableExceptionCheckTest extends BaseCheckTestCase {
09: public void test() throws Exception {
10: DefaultConfiguration checkConfig = createCheckConfig(MutableExceptionCheck.class);
11:
12: String[] expected = {
13: "6:9: The field '_errorCode' must be declared final.",
14: "23:9: The field '_errorCode' must be declared final.", };
15:
16: verify(checkConfig, getPath("design" + File.separator
17: + "InputMutableException.java"), expected);
18: }
19: }
|