users
[Top] [All Lists]

RE: [cinjug-users] File Mocks

To: "'Mark Windholtz'" <windholtz@xxxxxxxxx>, "'CinJug'" <users@xxxxxxxxxx>
Subject: RE: [cinjug-users] File Mocks
From: "James Carman" <james@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Nov 2005 07:57:57 -0500
Delivered-to: mailing list users@cinjug.org
In-reply-to: <B076CF17-9EB3-47AD-B51F-B38DA5806E42@gmail.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Thread-index: AcXrdEEM7Qba8OuXTNGU/Xi09Nmq8gAAdsVg
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



<Prev in Thread] Current Thread [Next in Thread>