1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.puppycrawl.tools.checkstyle.checks;
21
22 import static com.puppycrawl.tools.checkstyle.checks.NumericalPrefixesInfixesSuffixesCharacterCaseCheck.MSG_INFIX;
23 import static com.puppycrawl.tools.checkstyle.checks.NumericalPrefixesInfixesSuffixesCharacterCaseCheck.MSG_PREFIX;
24 import static com.puppycrawl.tools.checkstyle.checks.NumericalPrefixesInfixesSuffixesCharacterCaseCheck.MSG_SUFFIX;
25
26 import org.junit.jupiter.api.Test;
27
28 import com.puppycrawl.tools.checkstyle.AbstractExamplesModuleTestSupport;
29
30 public class NumericalPrefixesInfixesSuffixesCharacterCaseCheckExamplesTest
31 extends AbstractExamplesModuleTestSupport {
32
33 @Override
34 public String getPackageLocation() {
35 return
36 "com/puppycrawl/tools/checkstyle/checks/numericalprefixesinfixessuffixescharactercase";
37 }
38
39 @Test
40 public void testExample1() throws Exception {
41 final String[] expected = {
42 "13:14: " + getCheckMessage(MSG_PREFIX),
43 "16:14: " + getCheckMessage(MSG_PREFIX),
44 "19:16: " + getCheckMessage(MSG_INFIX),
45 "22:19: " + getCheckMessage(MSG_INFIX),
46 "25:16: " + getCheckMessage(MSG_SUFFIX),
47 "28:17: " + getCheckMessage(MSG_SUFFIX),
48 "31:16: " + getCheckMessage(MSG_INFIX),
49 "34:17: " + getCheckMessage(MSG_INFIX),
50 "35:17: " + getCheckMessage(MSG_SUFFIX),
51 };
52
53 verifyWithInlineConfigParser(getPath("Example1.java"), expected);
54 }
55 }