| Home >> All >> com >> puppycrawl >> tools >> checkstyle >> [ checks Javadoc ] |
Source code: com/puppycrawl/tools/checkstyle/checks/MemberNameCheckTest.java
1 package com.puppycrawl.tools.checkstyle.checks; 2 3 import com.puppycrawl.tools.checkstyle.BaseCheckTestCase; 4 import com.puppycrawl.tools.checkstyle.DefaultConfiguration; 5 6 public class MemberNameCheckTest 7 extends BaseCheckTestCase 8 { 9 public void testSpecified() 10 throws Exception 11 { 12 final DefaultConfiguration checkConfig = 13 createCheckConfig(MemberNameCheck.class); 14 checkConfig.addAttribute("format", "^m[A-Z][a-zA-Z0-9]*$"); 15 final String[] expected = { 16 "35:17: Name 'badMember' must match pattern '^m[A-Z][a-zA-Z0-9]*$'.", 17 }; 18 verify(checkConfig, getPath("InputSimple.java"), expected); 19 } 20 } 21