I know this has been discussed before, but it seems to have dissappeared off the radar, which is a shame because i always run into it.
My problem is that i have a project with multiple modules; and my unit tests typically reference data files under the module which own the tests.
These references are usually relative to the module root;
From a test case, i would like to load a file from "test/data/testDataFile.txt" - but this doens't work in multi-module prjects, i would have to reference it "ModuleA/test/data...", unless i specify the default working dir per package/class/method.
What i would like to do is to set the default working directory for each module. That way i dont have to edit lots of run configurations, but i cant see a way to do that!
Whats the general consensus here, have people come accross this problem before? Do you not reference files relative to the module? If not, then how do you reference test files?
I dont want to have to reference relative to project root, because you should be able to import the module into different projects and directory names, and still have the tests run, IMHO.