Adam Lally wrote:
> JUnitExtension.getFile(".") results in a call to
> ClassLoader.getResource("."), which seems odd to me.  Since the
> classpath is a sequence of directories/jars, what do you get when you
> ask for "."?  Just whatever happens to be first in the classpath?  It
> seems unsafe to assume that this will always return you the directory
> containing the test resources.  I think I would prefer:
>
> String workingDir =
> JUnitExtension.getFile("TypeSystemDescriptionImplTest").getParentFile().getAbsolutePath();
>
>
> -Adam
>

I agree, I actually had your preferred option committed before I noticed that JUnitExtension.getFile(".") works as well. Just wasn't sure this wouldn't make the test case vacuous ;-).

So what does JUnitExtension.getFile("") do then (as that was there originally)?

--Thilo

Reply via email to