From cd2ff0f345f854f44a87f0944f400c98031b5f8c Mon Sep 17 00:00:00 2001 From: Benoit Lacelle Date: Mon, 27 Feb 2023 10:26:37 +0400 Subject: [PATCH 1/3] Less errors in equoIde --- .../maven/java/CleanthatJavaRefactorerTest.java | 12 ++++++------ .../cleanthat/LiteralsFirstInComparisons.clean.java | 8 -------- .../cleanthat/LiteralsFirstInComparisons.dirty.java | 8 -------- .../cleanthat/LiteralsFirstInComparisons_clean.java | 8 ++++++++ .../cleanthat/LiteralsFirstInComparisons_dirty.java | 8 ++++++++ ...tators.clean.java => MultipleMutators_clean.java} | 4 ++-- ...=> MultipleMutators_clean_onlyLiteralsFirst.java} | 4 ++-- ...ultipleMutators_clean_onlyOptionalIsPresent.java} | 4 ++-- ...tators.dirty.java => MultipleMutators_dirty.java} | 4 ++-- 9 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java delete mode 100644 testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java create mode 100644 testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_clean.java create mode 100644 testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_dirty.java rename testlib/src/main/resources/java/cleanthat/{MultipleMutators.clean.java => MultipleMutators_clean.java} (62%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators.clean.onlyLiteralsFirst.java => MultipleMutators_clean_onlyLiteralsFirst.java} (61%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators.clean.onlyOptionalIsPresent.java => MultipleMutators_clean_onlyOptionalIsPresent.java} (62%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators.dirty.java => MultipleMutators_dirty.java} (61%) diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java index 379397f55b..67a4c2efb2 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java @@ -33,7 +33,7 @@ void testEnableDraft() throws Exception { " true", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyOptionalIsPresent.java"); + runTest("MultipleMutators_dirty.java", "MultipleMutators_clean_onlyOptionalIsPresent.java"); } @Test @@ -45,7 +45,7 @@ void testLiteralsFirstInComparisons() throws Exception { " ", ""); - runTest("LiteralsFirstInComparisons.dirty.java", "LiteralsFirstInComparisons.clean.java"); + runTest("LiteralsFirstInComparisons_dirty.java", "LiteralsFirstInComparisons_clean.java"); } @Test @@ -59,7 +59,7 @@ void testMultipleMutators_defaultIsJdk7() throws Exception { " ", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyLiteralsFirst.java"); + runTest("MultipleMutators_dirty.java", "MultipleMutators_clean_onlyLiteralsFirst.java"); } @Test @@ -73,7 +73,7 @@ void testMultipleMutators_Jdk11IntroducedOptionalisPresent() throws Exception { " ", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.java"); + runTest("MultipleMutators_dirty.java", "MultipleMutators_clean.java"); } @Test @@ -89,7 +89,7 @@ void testExcludeOptionalNotEmpty() throws Exception { " ", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyLiteralsFirst.java"); + runTest("MultipleMutators_dirty.java", "MultipleMutators_clean_onlyLiteralsFirst.java"); } @Test @@ -101,7 +101,7 @@ void testIncludeOnlyLiteralsFirstInComparisons() throws Exception { " ", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyLiteralsFirst.java"); + runTest("MultipleMutators_dirty.java", "MultipleMutators_clean_onlyLiteralsFirst.java"); } private void runTest(String dirtyPath, String cleanPath) throws Exception { diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java deleted file mode 100644 index 8bacfa58db..0000000000 --- a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java +++ /dev/null @@ -1,8 +0,0 @@ -package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; - -public class LiteralsFirstInComparisonsCases { - - public boolean isHardcoded(String input) { - return "hardcoded".equals(input); - } -} diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java deleted file mode 100644 index 3a1e074c91..0000000000 --- a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java +++ /dev/null @@ -1,8 +0,0 @@ -package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; - -public class LiteralsFirstInComparisonsCases { - - public boolean isHardcoded(String input) { - return input.equals("hardcoded"); - } -} diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_clean.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_clean.java new file mode 100644 index 0000000000..07807a6721 --- /dev/null +++ b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_clean.java @@ -0,0 +1,8 @@ +package java.cleanthat; + +public class LiteralsFirstInComparisons_clean { + + public boolean isHardcoded(String input) { + return "hardcoded".equals(input); + } +} diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_dirty.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_dirty.java new file mode 100644 index 0000000000..249b8da8b3 --- /dev/null +++ b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_dirty.java @@ -0,0 +1,8 @@ +package java.cleanthat; + +public class LiteralsFirstInComparisons_dirty { + + public boolean isHardcoded(String input) { + return input.equals("hardcoded"); + } +} diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean.java similarity index 62% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators_clean.java index 318e1efa15..76837b6893 100644 --- a/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.java +++ b/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean.java @@ -1,8 +1,8 @@ -package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; +package java.cleanthat; import java.util.Optional; -public class LiteralsFirstInComparisonsCases { +public class MultipleMutators_clean { public boolean isHardcoded(String input) { return "hardcoded".equals(input); diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyLiteralsFirst.java similarity index 61% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyLiteralsFirst.java index 629d24504b..d9fb87dd80 100644 --- a/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.java +++ b/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyLiteralsFirst.java @@ -1,8 +1,8 @@ -package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; +package java.cleanthat; import java.util.Optional; -public class LiteralsFirstInComparisonsCases { +public class MultipleMutators_clean_onlyLiteralsFirst { public boolean isHardcoded(String input) { return "hardcoded".equals(input); diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyOptionalIsPresent.java similarity index 62% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyOptionalIsPresent.java index 0829602dc1..54600ebc1c 100644 --- a/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.java +++ b/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyOptionalIsPresent.java @@ -1,8 +1,8 @@ -package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; +package java.cleanthat; import java.util.Optional; -public class LiteralsFirstInComparisonsCases { +public class MultipleMutators_clean_onlyOptionalIsPresent { public boolean isHardcoded(String input) { return input.equals("hardcoded"); diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators_dirty.java similarity index 61% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators_dirty.java index 8ac230cabc..e71b810e2f 100644 --- a/testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.java +++ b/testlib/src/main/resources/java/cleanthat/MultipleMutators_dirty.java @@ -1,8 +1,8 @@ -package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; +package java.cleanthat; import java.util.Optional; -public class LiteralsFirstInComparisonsCases { +public class MultipleMutators_dirty { public boolean isHardcoded(String input) { return input.equals("hardcoded"); From a601efc10714797a0324ed280f0578176752b84b Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Mon, 27 Feb 2023 15:05:20 -0800 Subject: [PATCH 2/3] Revert "Less errors in equoIde" This reverts commit cd2ff0f345f854f44a87f0944f400c98031b5f8c. --- .../maven/java/CleanthatJavaRefactorerTest.java | 12 ++++++------ .../cleanthat/LiteralsFirstInComparisons.clean.java | 8 ++++++++ .../cleanthat/LiteralsFirstInComparisons.dirty.java | 8 ++++++++ .../cleanthat/LiteralsFirstInComparisons_clean.java | 8 -------- .../cleanthat/LiteralsFirstInComparisons_dirty.java | 8 -------- ...tators_clean.java => MultipleMutators.clean.java} | 4 ++-- ...=> MultipleMutators.clean.onlyLiteralsFirst.java} | 4 ++-- ...ultipleMutators.clean.onlyOptionalIsPresent.java} | 4 ++-- ...tators_dirty.java => MultipleMutators.dirty.java} | 4 ++-- 9 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java create mode 100644 testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java delete mode 100644 testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_clean.java delete mode 100644 testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_dirty.java rename testlib/src/main/resources/java/cleanthat/{MultipleMutators_clean.java => MultipleMutators.clean.java} (62%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators_clean_onlyLiteralsFirst.java => MultipleMutators.clean.onlyLiteralsFirst.java} (61%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators_clean_onlyOptionalIsPresent.java => MultipleMutators.clean.onlyOptionalIsPresent.java} (62%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators_dirty.java => MultipleMutators.dirty.java} (61%) diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java index 67a4c2efb2..379397f55b 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java @@ -33,7 +33,7 @@ void testEnableDraft() throws Exception { " true", ""); - runTest("MultipleMutators_dirty.java", "MultipleMutators_clean_onlyOptionalIsPresent.java"); + runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyOptionalIsPresent.java"); } @Test @@ -45,7 +45,7 @@ void testLiteralsFirstInComparisons() throws Exception { " ", ""); - runTest("LiteralsFirstInComparisons_dirty.java", "LiteralsFirstInComparisons_clean.java"); + runTest("LiteralsFirstInComparisons.dirty.java", "LiteralsFirstInComparisons.clean.java"); } @Test @@ -59,7 +59,7 @@ void testMultipleMutators_defaultIsJdk7() throws Exception { " ", ""); - runTest("MultipleMutators_dirty.java", "MultipleMutators_clean_onlyLiteralsFirst.java"); + runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyLiteralsFirst.java"); } @Test @@ -73,7 +73,7 @@ void testMultipleMutators_Jdk11IntroducedOptionalisPresent() throws Exception { " ", ""); - runTest("MultipleMutators_dirty.java", "MultipleMutators_clean.java"); + runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.java"); } @Test @@ -89,7 +89,7 @@ void testExcludeOptionalNotEmpty() throws Exception { " ", ""); - runTest("MultipleMutators_dirty.java", "MultipleMutators_clean_onlyLiteralsFirst.java"); + runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyLiteralsFirst.java"); } @Test @@ -101,7 +101,7 @@ void testIncludeOnlyLiteralsFirstInComparisons() throws Exception { " ", ""); - runTest("MultipleMutators_dirty.java", "MultipleMutators_clean_onlyLiteralsFirst.java"); + runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyLiteralsFirst.java"); } private void runTest(String dirtyPath, String cleanPath) throws Exception { diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java new file mode 100644 index 0000000000..8bacfa58db --- /dev/null +++ b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java @@ -0,0 +1,8 @@ +package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; + +public class LiteralsFirstInComparisonsCases { + + public boolean isHardcoded(String input) { + return "hardcoded".equals(input); + } +} diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java new file mode 100644 index 0000000000..3a1e074c91 --- /dev/null +++ b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java @@ -0,0 +1,8 @@ +package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; + +public class LiteralsFirstInComparisonsCases { + + public boolean isHardcoded(String input) { + return input.equals("hardcoded"); + } +} diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_clean.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_clean.java deleted file mode 100644 index 07807a6721..0000000000 --- a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_clean.java +++ /dev/null @@ -1,8 +0,0 @@ -package java.cleanthat; - -public class LiteralsFirstInComparisons_clean { - - public boolean isHardcoded(String input) { - return "hardcoded".equals(input); - } -} diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_dirty.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_dirty.java deleted file mode 100644 index 249b8da8b3..0000000000 --- a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons_dirty.java +++ /dev/null @@ -1,8 +0,0 @@ -package java.cleanthat; - -public class LiteralsFirstInComparisons_dirty { - - public boolean isHardcoded(String input) { - return input.equals("hardcoded"); - } -} diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.java similarity index 62% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators_clean.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.java index 76837b6893..318e1efa15 100644 --- a/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean.java +++ b/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.java @@ -1,8 +1,8 @@ -package java.cleanthat; +package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; import java.util.Optional; -public class MultipleMutators_clean { +public class LiteralsFirstInComparisonsCases { public boolean isHardcoded(String input) { return "hardcoded".equals(input); diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyLiteralsFirst.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.java similarity index 61% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyLiteralsFirst.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.java index d9fb87dd80..629d24504b 100644 --- a/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyLiteralsFirst.java +++ b/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.java @@ -1,8 +1,8 @@ -package java.cleanthat; +package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; import java.util.Optional; -public class MultipleMutators_clean_onlyLiteralsFirst { +public class LiteralsFirstInComparisonsCases { public boolean isHardcoded(String input) { return "hardcoded".equals(input); diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyOptionalIsPresent.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.java similarity index 62% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyOptionalIsPresent.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.java index 54600ebc1c..0829602dc1 100644 --- a/testlib/src/main/resources/java/cleanthat/MultipleMutators_clean_onlyOptionalIsPresent.java +++ b/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.java @@ -1,8 +1,8 @@ -package java.cleanthat; +package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; import java.util.Optional; -public class MultipleMutators_clean_onlyOptionalIsPresent { +public class LiteralsFirstInComparisonsCases { public boolean isHardcoded(String input) { return input.equals("hardcoded"); diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators_dirty.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.java similarity index 61% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators_dirty.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.java index e71b810e2f..8ac230cabc 100644 --- a/testlib/src/main/resources/java/cleanthat/MultipleMutators_dirty.java +++ b/testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.java @@ -1,8 +1,8 @@ -package java.cleanthat; +package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me; import java.util.Optional; -public class MultipleMutators_dirty { +public class LiteralsFirstInComparisonsCases { public boolean isHardcoded(String input) { return input.equals("hardcoded"); From 5560214545a3d2655298bcb50691c1bf9325dc7f Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Mon, 27 Feb 2023 15:08:12 -0800 Subject: [PATCH 3/3] Rename `.java` to `.test` to match other java formatters. --- .../spotless/CleanthatJavaIntegrationTest.java | 4 ++-- .../maven/java/CleanthatJavaRefactorerTest.java | 14 +++++++------- ....java => LiteralsFirstInComparisons.clean.test} | 0 ....java => LiteralsFirstInComparisons.dirty.test} | 0 ... MultipleMutators.clean.onlyLiteralsFirst.test} | 0 ...tipleMutators.clean.onlyOptionalIsPresent.test} | 0 ...tors.clean.java => MultipleMutators.clean.test} | 0 ...tors.dirty.java => MultipleMutators.dirty.test} | 0 8 files changed, 9 insertions(+), 9 deletions(-) rename testlib/src/main/resources/java/cleanthat/{LiteralsFirstInComparisons.clean.java => LiteralsFirstInComparisons.clean.test} (100%) rename testlib/src/main/resources/java/cleanthat/{LiteralsFirstInComparisons.dirty.java => LiteralsFirstInComparisons.dirty.test} (100%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators.clean.onlyLiteralsFirst.java => MultipleMutators.clean.onlyLiteralsFirst.test} (100%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators.clean.onlyOptionalIsPresent.java => MultipleMutators.clean.onlyOptionalIsPresent.test} (100%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators.clean.java => MultipleMutators.clean.test} (100%) rename testlib/src/main/resources/java/cleanthat/{MultipleMutators.dirty.java => MultipleMutators.dirty.test} (100%) diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/CleanthatJavaIntegrationTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/CleanthatJavaIntegrationTest.java index 581bfe89b2..ad6fff9112 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/CleanthatJavaIntegrationTest.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/CleanthatJavaIntegrationTest.java @@ -37,8 +37,8 @@ void integration() throws IOException { " }", "}"); - setFile("test.java").toResource("java/cleanthat/MultipleMutators.dirty.java"); + setFile("test.java").toResource("java/cleanthat/MultipleMutators.dirty.test"); gradleRunner().withArguments("spotlessApply").build(); - assertFile("test.java").sameAsResource("java/cleanthat/MultipleMutators.clean.java"); + assertFile("test.java").sameAsResource("java/cleanthat/MultipleMutators.clean.test"); } } diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java index 379397f55b..738624cd57 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/CleanthatJavaRefactorerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.diffplug.spotless.maven.java; +package com.diffplug.spotless.maven.test; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; @@ -33,7 +33,7 @@ void testEnableDraft() throws Exception { " true", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyOptionalIsPresent.java"); + runTest("MultipleMutators.dirty.test", "MultipleMutators.clean.onlyOptionalIsPresent.test"); } @Test @@ -45,7 +45,7 @@ void testLiteralsFirstInComparisons() throws Exception { " ", ""); - runTest("LiteralsFirstInComparisons.dirty.java", "LiteralsFirstInComparisons.clean.java"); + runTest("LiteralsFirstInComparisons.dirty.test", "LiteralsFirstInComparisons.clean.test"); } @Test @@ -59,7 +59,7 @@ void testMultipleMutators_defaultIsJdk7() throws Exception { " ", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyLiteralsFirst.java"); + runTest("MultipleMutators.dirty.test", "MultipleMutators.clean.onlyLiteralsFirst.test"); } @Test @@ -73,7 +73,7 @@ void testMultipleMutators_Jdk11IntroducedOptionalisPresent() throws Exception { " ", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.java"); + runTest("MultipleMutators.dirty.test", "MultipleMutators.clean.test"); } @Test @@ -89,7 +89,7 @@ void testExcludeOptionalNotEmpty() throws Exception { " ", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyLiteralsFirst.java"); + runTest("MultipleMutators.dirty.test", "MultipleMutators.clean.onlyLiteralsFirst.test"); } @Test @@ -101,7 +101,7 @@ void testIncludeOnlyLiteralsFirstInComparisons() throws Exception { " ", ""); - runTest("MultipleMutators.dirty.java", "MultipleMutators.clean.onlyLiteralsFirst.java"); + runTest("MultipleMutators.dirty.test", "MultipleMutators.clean.onlyLiteralsFirst.test"); } private void runTest(String dirtyPath, String cleanPath) throws Exception { diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.test similarity index 100% rename from testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.java rename to testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.clean.test diff --git a/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java b/testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.test similarity index 100% rename from testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.java rename to testlib/src/main/resources/java/cleanthat/LiteralsFirstInComparisons.dirty.test diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.test similarity index 100% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyLiteralsFirst.test diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.test similarity index 100% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.onlyOptionalIsPresent.test diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.test similarity index 100% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators.clean.test diff --git a/testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.java b/testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.test similarity index 100% rename from testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.java rename to testlib/src/main/resources/java/cleanthat/MultipleMutators.dirty.test