Skip to content

Commit bc34a4b

Browse files
committed
Run spotlessApply
1 parent a414e93 commit bc34a4b

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

testlib/src/test/java/com/diffplug/spotless/generic/LicenseHeaderStepTest.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@
2121
import java.time.YearMonth;
2222
import java.time.ZoneOffset;
2323

24-
import com.diffplug.spotless.StepHarnessWithFile;
25-
2624
import org.junit.jupiter.api.Assertions;
2725
import org.junit.jupiter.api.Test;
2826

2927
import com.diffplug.spotless.FormatterStep;
3028
import com.diffplug.spotless.ResourceHarness;
3129
import com.diffplug.spotless.SerializableEqualityTester;
3230
import com.diffplug.spotless.StepHarness;
31+
import com.diffplug.spotless.StepHarnessWithFile;
3332
import com.diffplug.spotless.generic.LicenseHeaderStep.YearMode;
3433

3534
class LicenseHeaderStepTest extends ResourceHarness {
@@ -173,8 +172,8 @@ private String hasHeaderFileName(String license, String fileName) throws IOExcep
173172

174173
private String hasHeaderYearFileName(String license, String year, String fileName) throws IOException {
175174
return header(license)
176-
.replace("$YEAR", year)
177-
.replace("$FILE", fileName) + getTestResource(FILE_NO_LICENSE);
175+
.replace("$YEAR", year)
176+
.replace("$FILE", fileName) + getTestResource(FILE_NO_LICENSE);
178177
}
179178

180179
private static String currentYear() {
@@ -269,17 +268,16 @@ void should_preserve_year_for_license_with_address() throws Throwable {
269268
void should_apply_license_containing_filename_token() throws Exception {
270269
FormatterStep step = LicenseHeaderStep.headerDelimiter(header(HEADER_WITH_$FILE), package_).build();
271270
StepHarnessWithFile.forStep(this, step)
272-
.test(new File("Test.java"), getTestResource(FILE_NO_LICENSE), hasHeaderFileName(HEADER_WITH_$FILE, "Test.java"));
271+
.test(new File("Test.java"), getTestResource(FILE_NO_LICENSE), hasHeaderFileName(HEADER_WITH_$FILE, "Test.java"));
273272
}
274273

275274
@Test
276275
void should_apply_license_containing_YEAR_filename_token() throws Exception {
277276
FormatterStep step = LicenseHeaderStep.headerDelimiter(header(HEADER_WITH_$YEAR_$FILE), package_).build();
278277
StepHarnessWithFile.forStep(this, step)
279-
.test(
280-
new File("Test.java"),
281-
getTestResource(FILE_NO_LICENSE),
282-
hasHeaderYearFileName(HEADER_WITH_$YEAR_$FILE, currentYear(), "Test.java")
283-
);
278+
.test(
279+
new File("Test.java"),
280+
getTestResource(FILE_NO_LICENSE),
281+
hasHeaderYearFileName(HEADER_WITH_$YEAR_$FILE, currentYear(), "Test.java"));
284282
}
285283
}

0 commit comments

Comments
 (0)