Mark,
The problem with using EasyMock is that the java.io.File class is exactly
that, a class (not an interface). So, it's difficult at best to mock it.
You would have to come up with a subclass that mocked up the implementation.
You'd probably have to do a LOT of work to get the mock to work correctly
without actually going to the filesystem underneath.
Jim
-----Original Message-----
From: Mark Windholtz [mailto:windholtz@xxxxxxxxx]
Sent: Thursday, November 17, 2005 7:41 AM
To: CinJug
Subject: Re: [cinjug-users] File Mocks
Edward,
There was an effort a while back to provide Mocks for all standard
Java APIs,
but if I'm remembering right, it was stopped shortly after when
easymock.org was released.
I couldn't find links to it though.
Could you use EasyMock ?
- Mark
On Nov 16, 2005, at 09:17 PM, Edward Sumerfield wrote:
> I am writing some file manipulation programs and am having problems
> with testing them. Anyone know if there are some ways to mock my
> Files?
>
> Ed
>
Regards,
- Mark Windholtz
(513) 226-8259
railsstudio.com
---------
You may unsubscribe from this mailing list
by sending a blank email addressed to:
users-unsubscribe@xxxxxxxxxx
--
Find additional help by sending a blank email
addressed to:
users-help@xxxxxxxxxx
|