File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
plugin-maven/src/test/java/com/diffplug/spotless/maven Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,10 @@ protected void writePomWithMarkdownSteps(String... steps) throws IOException {
156156 writePom (groupWithSteps ("markdown" , including ("**/*.md" ), steps ));
157157 }
158158
159+ protected void writePomWithJsonSteps (String ... steps ) throws IOException {
160+ writePom (groupWithSteps ("json" , including ("**/*.json" ), steps ));
161+ }
162+
159163 protected void writePom (String ... configuration ) throws IOException {
160164 writePom (null , configuration , null );
161165 }
Original file line number Diff line number Diff line change 2222public class JsonTest extends MavenIntegrationHarness {
2323 @ Test
2424 public void testFormatJson_WithSimple_defaultConfig () throws Exception {
25- writePomWithPomSteps ("<json><simple/></json>" );
25+ writePomWithJsonSteps ("<json><simple/></json>" );
2626
27- setFile ("json_test.json" ).toResource ("json/json_dirty .json" );
27+ setFile ("json_test.json" ).toResource ("json/sortByKeysBefore .json" );
2828 mavenRunner ().withArguments ("spotless:apply" ).runNoError ().error ();
29- assertFile ("json_test.json" ).sameAsResource ("json/json_clean_default .json" );
29+ assertFile ("json_test.json" ).sameAsResource ("json/sortByKeysAfterDisabled .json" );
3030 }
3131
3232 @ Test
3333 public void testFormatJson_WithGson_defaultConfig () throws Exception {
34- writePomWithPomSteps ("<json><gson/></json>" );
34+ writePomWithJsonSteps ("<json><gson/></json>" );
3535
36- setFile ("json_test.json" ).toResource ("json/json_dirty .json" );
36+ setFile ("json_test.json" ).toResource ("json/sortByKeysBefore .json" );
3737 mavenRunner ().withArguments ("spotless:apply" ).runNoError ().error ();
38- assertFile ("json_test.json" ).sameAsResource ("json/json_clean_default .json" );
38+ assertFile ("json_test.json" ).sameAsResource ("json/sortByKeysAfterDisabled .json" );
3939 }
4040}
You can’t perform that action at this time.
0 commit comments