As discussed at ApacheCon: Try to automatically find test-data in unit tests, this makes it easier to get going in Eclipse or other IDEs.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4b487fcc10
commit
cc1caaf658
@ -197,9 +197,13 @@ public final class POIDataSamples {
|
||||
return;
|
||||
}
|
||||
|
||||
if(new File("test-data").exists()) {
|
||||
dataDirName = "test-data";
|
||||
} else {
|
||||
throw new RuntimeException("Must set system property '" +
|
||||
TEST_PROPERTY + "' before running tests");
|
||||
}
|
||||
}
|
||||
File dataDir = new File(dataDirName, _moduleDir);
|
||||
if (!dataDir.exists()) {
|
||||
throw new RuntimeException("Data dir '" + _moduleDir + " does not exist");
|
||||
|
Loading…
Reference in New Issue
Block a user