diff options
author | rnveach <rveach02@gmail.com> | 2015-10-12 12:46:08 -0400 |
---|---|---|
committer | Roman Ivanov <ivanov-jr@mail.ru> | 2015-10-12 12:44:44 -0700 |
commit | c5768cf8b43f0de91988e94e74643f1c2d310702 (patch) | |
tree | 5134dcaaba17694ea864b9014aba1743e7f820e7 /src/test/java | |
parent | 48560f8f925958bba4865e04a71c2760bbac2f17 (diff) | |
download | checkstyle-c5768cf8b43f0de91988e94e74643f1c2d310702.tar.gz |
Issue #2161: unify test input locations
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportTest.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportTest.java index 7be367c78..c5aa2b304 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/imports/AvoidStaticImportTest.java @@ -23,6 +23,7 @@ import static com.puppycrawl.tools.checkstyle.checks.imports.AvoidStaticImportCh import static org.junit.Assert.assertArrayEquals; import java.io.File; +import java.io.IOException; import org.junit.Test; @@ -32,6 +33,11 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; public class AvoidStaticImportTest extends BaseCheckTestSupport { + @Override + protected String getPath(String filename) throws IOException { + return super.getPath("checks" + File.separator + + "imports" + File.separator + filename); + } @Test public void testGetRequiredTokens() { @@ -55,7 +61,7 @@ public class AvoidStaticImportTest "30: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.imports.InputAvoidStaticImportNestedClass.InnerClass.one"), }; - verify(checkConfig, getPath("imports" + File.separator + "InputAvoidStaticImportCheck.java"), expected); + verify(checkConfig, getPath("InputAvoidStaticImportCheck.java"), expected); } @Test @@ -71,7 +77,7 @@ public class AvoidStaticImportTest "29: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.imports.InputAvoidStaticImportNestedClass.InnerClass"), "30: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.imports.InputAvoidStaticImportNestedClass.InnerClass.one"), }; - verify(checkConfig, getPath("imports" + File.separator + "InputAvoidStaticImportCheck.java"), expected); + verify(checkConfig, getPath("InputAvoidStaticImportCheck.java"), expected); } @Test @@ -89,7 +95,7 @@ public class AvoidStaticImportTest "29: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.imports.InputAvoidStaticImportNestedClass.InnerClass"), "30: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.imports.InputAvoidStaticImportNestedClass.InnerClass.one"), }; - verify(checkConfig, getPath("imports" + File.separator + "InputAvoidStaticImportCheck.java"), expected); + verify(checkConfig, getPath("InputAvoidStaticImportCheck.java"), expected); } @Test @@ -112,7 +118,7 @@ public class AvoidStaticImportTest "29: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.imports.InputAvoidStaticImportNestedClass.InnerClass"), "30: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.imports.InputAvoidStaticImportNestedClass.InnerClass.one"), }; - verify(checkConfig, getPath("imports" + File.separator + "InputAvoidStaticImportCheck.java"), expected); + verify(checkConfig, getPath("InputAvoidStaticImportCheck.java"), expected); } @Test @@ -133,7 +139,7 @@ public class AvoidStaticImportTest "28: " + getCheckMessage(MSG_KEY, "java.io.File.pathSeparator"), "29: " + getCheckMessage(MSG_KEY, "com.puppycrawl.tools.checkstyle.imports.InputAvoidStaticImportNestedClass.InnerClass"), }; - verify(checkConfig, getPath("imports" + File.separator + "InputAvoidStaticImportCheck.java"), expected); + verify(checkConfig, getPath("InputAvoidStaticImportCheck.java"), expected); } @Test @@ -145,5 +151,4 @@ public class AvoidStaticImportTest assertArrayEquals(expected, actual); } - } |