Adam Lally wrote:
On 12/22/06, Thilo Goetz <[EMAIL PROTECTED]> wrote:
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 ;-).


Nah, it's still a useful test.

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


No clue.  Javadocs for ClassLoader.getResource(path) are silent on
what happens if path is empty string.  I'd avoid doing that.

BTW, this wasn't the way I originally wrote the test.  Originally it
was calling JUnitExtension.getBasePath().  But in the Maven migration
I had to hack up getBasePath to use a classpath lookup.  Recently
Michael removed that method entirely and changed everything to use
getFile(), which I think was the right thing to do.  We just need to
be careful that we're actually looking up a real file (or directory)
when we call that method.

-Adam

Ah, I see, thanks.  I guess we may stumble across more of those.

I have committed the version you suggest and will close the issue.

--Thilo


Reply via email to