KickJava   Java API By Example, From Geeks To Geeks.

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


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 ParameterAssignmentCheckTest extends BaseCheckTestCase
9 {
10     public void testDefault()
11         throws Exception JavaDoc
12     {
13         final DefaultConfiguration checkConfig =
14             createCheckConfig(ParameterAssignmentCheck.class);
15         final String JavaDoc[] expected = {
16             "9:15: Assignment of parameter 'field' is not allowed.",
17             "10:15: Assignment of parameter 'field' is not allowed.",
18             "12:14: Assignment of parameter 'field' is not allowed.",
19             "20:30: Assignment of parameter 'field1' is not allowed.",
20         };
21         verify(checkConfig, getPath("coding" + File.separator + "InputParameterAssignment.java"),
22                expected);
23     }
24 }
25
Popular Tags