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.rule42blockindentation;
21
22 import org.junit.jupiter.api.Test;
23
24 import com.google.checkstyle.test.base.AbstractIndentationTestSupport;
25
26 public class BlockIndentation2SpacesTest extends AbstractIndentationTestSupport {
27
28 @Override
29 protected String getPackageLocation() {
30 return "com/google/checkstyle/test/chapter4formatting/rule42blockindentation";
31 }
32
33 @Test
34 public void testCorrectClass() throws Exception {
35 verifyWithWholeConfig(getPath("InputIndentationCorrectClass.java"));
36 }
37
38 @Test
39 public void testCorrectField() throws Exception {
40 verifyWithWholeConfig(getPath("InputIndentationCorrectFieldAndParameter.java"));
41 }
42
43 @Test
44 public void testCorrectFor() throws Exception {
45 verifyWithWholeConfig(getPath("InputIndentationCorrectForAndParameter.java"));
46 }
47
48 @Test
49 public void testCorrectIf() throws Exception {
50 verifyWithWholeConfig(getPath("InputIndentationCorrectIfAndParameter.java"));
51 }
52
53 @Test
54 public void testCorrectNewKeyword() throws Exception {
55 verifyWithWholeConfig(getPath("InputIndentationCorrectNewChildren.java"));
56 }
57
58 @Test
59 public void testCorrect() throws Exception {
60 verifyWithWholeConfig(getPath("InputIndentationCorrect.java"));
61 }
62
63 @Test
64 public void testCorrectReturn() throws Exception {
65 verifyWithWholeConfig(getPath("InputIndentationCorrectReturnAndParameter.java"));
66 }
67
68 @Test
69 public void testCorrectWhile() throws Exception {
70 verifyWithWholeConfig(getPath("InputIndentationCorrectWhileDoWhileAndParameter.java"));
71 }
72
73 @Test
74 public void testCorrectChained() throws Exception {
75 verifyWithWholeConfig(getPath("ClassWithChainedMethodsCorrect.java"));
76 }
77
78 @Test
79 public void testWarnChained() throws Exception {
80 verifyWithWholeConfig(getPath("ClassWithChainedMethods.java"));
81 }
82
83 @Test
84 public void testCorrectAnnotationArrayInit() throws Exception {
85 verifyWithWholeConfig(getPath("InputIndentationCorrectAnnotationArrayInit.java"));
86 }
87
88 @Test
89 public void testCodeBlocks() throws Exception {
90 verifyWithWholeConfig(getPath("InputIndentationCodeBlocks.java"));
91 }
92
93 @Test
94 public void testCodeBlocksFormatted() throws Exception {
95 verifyWithWholeConfig(getPath("InputFormattedIndentationCodeBlocks.java"));
96 }
97
98 @Test
99 public void testFastMatcher() throws Exception {
100 verifyWithWholeConfig(getPath("InputFastMatcher.java"));
101 }
102
103 }