1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.google.checkstyle.test.chapter4formatting.rule4852classannotations;
21
22 import org.junit.jupiter.api.Test;
23
24 import com.google.checkstyle.test.base.AbstractGoogleModuleTestSupport;
25
26 public class ClassAnnotationsTest extends AbstractGoogleModuleTestSupport {
27
28 @Override
29 protected String getPackageLocation() {
30 return "com/google/checkstyle/test/chapter4formatting/rule4852classannotations";
31 }
32
33 @Test
34 public void testAnnotation() throws Exception {
35 final String filePath = getPath("InputClassAnnotations.java");
36 verifyWithWholeConfig(filePath);
37 }
38
39 @Test
40 public void testAnnotationFormatted() throws Exception {
41 final String filePath = getPath("InputFormattedClassAnnotations.java");
42 verifyWithWholeConfig(filePath);
43 }
44
45 @Test
46 public void testAnnotation2() throws Exception {
47 final String filePath = getPath("InputClassAnnotation2.java");
48 verifyWithWholeConfig(filePath);
49 }
50
51 @Test
52 public void testAnnotation2Formatted() throws Exception {
53 final String filePath = getPath("InputFormattedClassAnnotation2.java");
54 verifyWithWholeConfig(filePath);
55 }
56
57 @Test
58 public void testPackageAnnotation() throws Exception {
59 final String filePath = getNonCompilablePath("package-info.java");
60 verifyWithWholeConfig(filePath);
61 }
62
63 @Test
64 public void testPackageAnnotation2() throws Exception {
65 final String filePath = getNonCompilablePath("example1/package-info.java");
66 verifyWithWholeConfig(filePath);
67 }
68
69 @Test
70 public void testPackageAnnotation3() throws Exception {
71 final String filePath = getNonCompilablePath("example2/package-info.java");
72 verifyWithWholeConfig(filePath);
73 }
74 }