@@ -153,9 +153,9 @@ void testWithHeader() throws IOException {
153
153
" ktlint()" ,
154
154
" }" ,
155
155
"}" );
156
- setFile ("src/main/kotlin/test .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" );
156
+ setFile ("src/main/kotlin/AnObject .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" );
157
157
gradleRunner ().withArguments ("spotlessApply" ).build ();
158
- assertFile ("src/main/kotlin/test .kt" ).hasContent (HEADER + "\n " + getTestResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" ));
158
+ assertFile ("src/main/kotlin/AnObject .kt" ).hasContent (HEADER + "\n " + getTestResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" ));
159
159
}
160
160
161
161
@ Test
@@ -173,9 +173,9 @@ void testWithHeaderKtfmt() throws IOException {
173
173
" ktfmt()" ,
174
174
" }" ,
175
175
"}" );
176
- setFile ("src/main/kotlin/test .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" );
176
+ setFile ("src/main/kotlin/AnObject .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" );
177
177
gradleRunner ().withArguments ("spotlessApply" ).build ();
178
- assertFile ("src/main/kotlin/test .kt" ).hasContent (HEADER + "\n " + getTestResource ("kotlin/licenseheader/KotlinCodeWithoutHeaderKtfmt.test" ));
178
+ assertFile ("src/main/kotlin/AnObject .kt" ).hasContent (HEADER + "\n " + getTestResource ("kotlin/licenseheader/KotlinCodeWithoutHeaderKtfmt.test" ));
179
179
}
180
180
181
181
@ Test
@@ -192,9 +192,9 @@ void testWithCustomHeaderSeparator() throws IOException {
192
192
" ktlint()" ,
193
193
" }" ,
194
194
"}" );
195
- setFile ("src/main/kotlin/test .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" );
195
+ setFile ("src/main/kotlin/AnObject .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" );
196
196
gradleRunner ().withArguments ("spotlessApply" ).build ();
197
- assertFile ("src/main/kotlin/test .kt" ).hasContent (HEADER + "\n " + getTestResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" ));
197
+ assertFile ("src/main/kotlin/AnObject .kt" ).hasContent (HEADER + "\n " + getTestResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" ));
198
198
}
199
199
200
200
@ Test
@@ -212,9 +212,9 @@ void testWithCustomHeaderSeparatorKtfmt() throws IOException {
212
212
" ktfmt()" ,
213
213
" }" ,
214
214
"}" );
215
- setFile ("src/main/kotlin/test .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" );
215
+ setFile ("src/main/kotlin/AnObject .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithoutHeader.test" );
216
216
gradleRunner ().withArguments ("spotlessApply" ).build ();
217
- assertFile ("src/main/kotlin/test .kt" ).hasContent (HEADER + "\n " + getTestResource ("kotlin/licenseheader/KotlinCodeWithoutHeaderKtfmt.test" ));
217
+ assertFile ("src/main/kotlin/AnObject .kt" ).hasContent (HEADER + "\n " + getTestResource ("kotlin/licenseheader/KotlinCodeWithoutHeaderKtfmt.test" ));
218
218
}
219
219
220
220
@ Test
@@ -232,13 +232,13 @@ void testWithNonStandardYearSeparator() throws IOException {
232
232
" }" ,
233
233
"}" );
234
234
235
- setFile ("src/main/kotlin/test .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithMultiYearHeader.test" );
236
- setFile ("src/main/kotlin/test2 .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithMultiYearHeader2.test" );
235
+ setFile ("src/main/kotlin/AnObject .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithMultiYearHeader.test" );
236
+ setFile ("src/main/kotlin/AnObject2 .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithMultiYearHeader2.test" );
237
237
gradleRunner ().withArguments ("spotlessApply" ).build ();
238
- assertFile ("src/main/kotlin/test .kt" ).matches (matcher -> {
238
+ assertFile ("src/main/kotlin/AnObject .kt" ).matches (matcher -> {
239
239
matcher .startsWith ("// License Header 2012, 2014" );
240
240
});
241
- assertFile ("src/main/kotlin/test2 .kt" ).matches (matcher -> {
241
+ assertFile ("src/main/kotlin/AnObject2 .kt" ).matches (matcher -> {
242
242
matcher .startsWith ("// License Header 2012, 2014" );
243
243
});
244
244
}
@@ -259,13 +259,13 @@ void testWithNonStandardYearSeparatorKtfmt() throws IOException {
259
259
" }" ,
260
260
"}" );
261
261
262
- setFile ("src/main/kotlin/test .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithMultiYearHeader.test" );
263
- setFile ("src/main/kotlin/test2 .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithMultiYearHeader2.test" );
262
+ setFile ("src/main/kotlin/AnObject .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithMultiYearHeader.test" );
263
+ setFile ("src/main/kotlin/AnObject2 .kt" ).toResource ("kotlin/licenseheader/KotlinCodeWithMultiYearHeader2.test" );
264
264
gradleRunner ().withArguments ("spotlessApply" ).build ();
265
- assertFile ("src/main/kotlin/test .kt" ).matches (matcher -> {
265
+ assertFile ("src/main/kotlin/AnObject .kt" ).matches (matcher -> {
266
266
matcher .startsWith ("// License Header 2012, 2014" );
267
267
});
268
- assertFile ("src/main/kotlin/test2 .kt" ).matches (matcher -> {
268
+ assertFile ("src/main/kotlin/AnObject2 .kt" ).matches (matcher -> {
269
269
matcher .startsWith ("// License Header 2012, 2014" );
270
270
});
271
271
}
0 commit comments