Skip to content

Commit

Permalink
Add a test for the "standard" case in lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Aug 9, 2020
1 parent 446acfa commit d3fda7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import static com.foo.Bar;
import static java.lang.Exception.*;
import static java.lang.Runnable.*;

import java.lang.Runnable;
import java.lang.Thread;
import org.dooda.Didoo;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 DiffPlug
* Copyright 2016-2020 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,11 @@
import com.diffplug.spotless.SerializableEqualityTester;

public class ImportOrderStepTest extends ResourceHarness {
@Test
public void sortImportsDefault() throws Throwable {
FormatterStep step = ImportOrderStep.forJava().createFrom();
assertOnResources(step, "java/importsorter/JavaCodeUnsortedImports.test", "java/importsorter/JavaCodeSortedImportsDefault.test");
}

@Test
public void sortImportsFromArray() throws Throwable {
Expand Down

0 comments on commit d3fda7f

Please sign in to comment.