diff options
author | rnveach <rveach02@gmail.com> | 2015-10-12 12:11:51 -0400 |
---|---|---|
committer | Roman Ivanov <ivanov-jr@mail.ru> | 2015-10-12 12:43:58 -0700 |
commit | 2f584ef4d5914dcb8a118d800be8b7df9913c511 (patch) | |
tree | 1114f476fefdc5c761402f4a4ec1a1ce9485df59 /src/test/java | |
parent | f7930327245e3de63e4dddd8d389a101c6785e2a (diff) | |
download | checkstyle-2f584ef4d5914dcb8a118d800be8b7df9913c511.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/design/ThrowsCountCheckTest.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheckTest.java index 08ab6083d..796e80cd8 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/design/ThrowsCountCheckTest.java @@ -25,6 +25,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import java.io.File; +import java.io.IOException; import org.junit.Test; @@ -36,6 +37,12 @@ import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; public class ThrowsCountCheckTest extends BaseCheckTestSupport { + @Override + protected String getPath(String filename) throws IOException { + return super.getPath("checks" + File.separator + + "design" + File.separator + filename); + } + @Test public void testDefault() throws Exception { DefaultConfiguration checkConfig = createCheckConfig(ThrowsCountCheck.class); @@ -47,7 +54,7 @@ public class ThrowsCountCheckTest extends BaseCheckTestSupport { "55:43: " + getCheckMessage(MSG_KEY, 5, 4), }; - verify(checkConfig, getPath("design" + File.separator + "InputThrowsCount.java"), expected); + verify(checkConfig, getPath("InputThrowsCount.java"), expected); } @Test @@ -59,7 +66,7 @@ public class ThrowsCountCheckTest extends BaseCheckTestSupport { "27:20: " + getCheckMessage(MSG_KEY, 6, 5), }; - verify(checkConfig, getPath("design" + File.separator + "InputThrowsCount.java"), expected); + verify(checkConfig, getPath("InputThrowsCount.java"), expected); } @Test @@ -101,6 +108,6 @@ public class ThrowsCountCheckTest extends BaseCheckTestSupport { "35:28: " + getCheckMessage(MSG_KEY, 5, 4), "55:43: " + getCheckMessage(MSG_KEY, 5, 4), }; - verify(checkConfig, getPath("design" + File.separator + "InputThrowsCount.java"), expected); + verify(checkConfig, getPath("InputThrowsCount.java"), expected); } } |