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.javadoc;
21
22 import static com.puppycrawl.tools.checkstyle.checks.javadoc.NonEmptyAtclauseDescriptionCheck.MSG_KEY;
23
24 import org.junit.jupiter.api.Test;
25
26 import com.puppycrawl.tools.checkstyle.AbstractExamplesModuleTestSupport;
27
28 public class NonEmptyAtclauseDescriptionCheckExamplesTest
29 extends AbstractExamplesModuleTestSupport {
30 @Override
31 protected String getPackageLocation() {
32 return "com/puppycrawl/tools/checkstyle/checks/javadoc"
33 + "/nonemptyatclausedescription";
34 }
35
36 @Test
37 public void testExample1() throws Exception {
38 final String[] expected = {
39 "17: " + getCheckMessage(MSG_KEY),
40 "18: " + getCheckMessage(MSG_KEY),
41 "19: " + getCheckMessage(MSG_KEY),
42 "20: " + getCheckMessage(MSG_KEY),
43 };
44
45 verifyWithInlineConfigParser(getPath("Example1.java"), expected);
46 }
47
48 @Test
49 public void testExample2() throws Exception {
50 final String[] expected = {
51 "19: " + getCheckMessage(MSG_KEY),
52 "21: " + getCheckMessage(MSG_KEY),
53 };
54
55 verifyWithInlineConfigParser(getPath("Example2.java"), expected);
56 }
57 }