1 package com.google.checkstyle.test.chapter5naming.rule523methodnames;
2
3 import org.junit.jupiter.api.BeforeAll;
4 import org.junit.jupiter.api.RepeatedTest;
5 import org.junit.jupiter.api.Test;
6 import org.junit.jupiter.params.ParameterizedTest;
7 import org.junit.jupiter.params.provider.ValueSource;
8
9
10
11
12
13
14 public class InputMethodName {
15 void foo() {}
16
17 void Foo() {}
18
19 void fOo() {}
20
21 void f0o() {}
22
23 void f$o() {}
24
25 void f_oo() {}
26
27 void f() {}
28
29 void fO() {}
30
31 @Test
32 void testing_foo() {
33 class LocalFoo {
34 void foo() {}
35
36
37 void testing_foo() {}
38 }
39
40 new Object() {
41 void foo() {}
42
43
44 void testing_foo() {}
45 };
46 }
47
48 void testing_foo(@FooTest String str) {
49
50 class LocalFoo {
51 void foo() {}
52
53
54 void testing_foo() {}
55 }
56
57 new Object() {
58 void foo() {}
59
60
61 void testing_foo() {}
62 };
63 }
64
65 @Test
66 void testing_Foo() {}
67
68 @Test
69 void testing_fOo() {}
70
71 @Test
72 void testingFoo() {}
73
74 @Test
75 void testingFoo_foo() {}
76
77 @Test
78 void testing_0123() {}
79
80 @Test
81 void testing_0123_() {}
82
83 @Test
84 void testing__0123() {}
85
86 @Test
87 void testing__0123_() {}
88
89 @Test
90 void testing__0123__() {}
91
92 @Test
93 void Testing_Foo() {}
94
95 @Test
96 void t_esting() {}
97
98 @Test
99 void _testing() {}
100
101 void Testing_Foo2() {}
102
103 @Test
104 void TestingFooBad() {}
105
106 @Test
107 void testing_foo_() {}
108
109 @Test
110 void testing_Foo_() {}
111
112 @Test
113 void testing__foo() {}
114
115 @Test
116 void testing__Foo() {}
117
118 @Test
119 void testing__foo_() {}
120
121 @Test
122 void testing__Foo_() {}
123
124 @ParameterizedTest
125 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
126 void testing_foo1(String str) {
127 class LocalFoo {
128 void foo() {}
129
130
131 void testing_foo() {}
132 }
133
134 new Object() {
135 void foo() {}
136
137
138 void testing_foo() {}
139 };
140 }
141
142 @ParameterizedTest
143 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
144 void testing_Foo1(String str) {}
145
146 @ParameterizedTest
147 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
148 void testing_fOo1(String str) {}
149
150 @ParameterizedTest
151 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
152 void testingFoo1(String str) {}
153
154 @ParameterizedTest
155 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
156 void testingFoo_foo1(String str) {}
157
158 @ParameterizedTest
159 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
160 void testing_01231(String str) {}
161
162 @ParameterizedTest
163 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
164 void Testing_Foo1(String str) {}
165
166 @ParameterizedTest
167 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
168 void t_esting1(String str) {}
169
170 @ParameterizedTest
171 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
172 void _testing1(String str) {}
173
174 @ParameterizedTest
175 @ValueSource(strings = {"racecar", "radar", "level", "madam", "noon"})
176 void TestingFooBad1(String str) {}
177
178 @RepeatedTest(2)
179 void testing_foo2() {}
180
181 @RepeatedTest(2)
182 void testing_Foo2() {}
183
184 @RepeatedTest(2)
185 void testing_fOo2() {}
186
187 @RepeatedTest(2)
188 void testingFoo2() {}
189
190 @RepeatedTest(2)
191 void testingFoo_foo2() {}
192
193 @RepeatedTest(2)
194 void testing_01232() {}
195
196 @RepeatedTest(2)
197 void Testing_Foo3() {}
198
199 @RepeatedTest(2)
200 void t_esting2() {}
201
202 @RepeatedTest(2)
203 void _testing2() {}
204
205 @RepeatedTest(2)
206 void TestingFooBad2() {}
207
208 @BeforeAll
209 static void _testingFoooo() {}
210
211 @org.junit.jupiter.api.Test
212 void testing_fq() {}
213
214 class InnerFoo {
215 void foo() {}
216
217 void Foo() {}
218
219 void fOo() {}
220
221 void f0o() {}
222
223 void f$o() {}
224
225 void f_oo() {}
226
227 void f() {}
228
229 void fO() {}
230
231 void testing_foo() {}
232
233 void testing_Foo() {}
234
235 void testing_fOo() {}
236
237 void testingFoo() {}
238
239 void testingFoo_foo() {}
240
241 void testing_0123() {}
242
243 void TestingFooBad() {}
244 }
245
246 InnerFoo anon =
247 new InnerFoo() {
248 void foo() {}
249
250 void Foo() {}
251
252 void fOo() {}
253
254 void f0o() {}
255
256 void f$o() {}
257
258 void f_oo() {}
259
260 void f() {}
261
262 void fO() {}
263 };
264
265 interface FooIn {
266 void foo();
267
268 void Foo();
269
270 void fOo();
271
272 void f0o();
273
274 void f$o();
275
276 void f_oo();
277
278 void f();
279
280 void fO();
281 }
282
283 @interface FooTest {}
284 }