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 ; 7 8 public class ParameterAssignmentCheckTest extends BaseCheckTestCase 9 { 10 public void testDefault() 11 throws Exception 12 { 13 final DefaultConfiguration checkConfig = 14 createCheckConfig(ParameterAssignmentCheck.class); 15 final String [] 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 |