How to mock a file with EasyMock?

Posted by Todd on Stack Overflow See other posts from Stack Overflow or by Todd
Published on 2010-04-22T01:24:32Z Indexed on 2010/04/22 1:33 UTC
Read the original article Hit count: 447

Filed under:
|
|
|
|

Hello,

I have recently been introduced to EasyMock and have been asked to develop some unit tests for a FileMonitor class using it. The FileMonitor class is based on a timed event that wakes up and checks for file modification(s) in a defined list of files and directories. I get how to do this using the actual file system, write a test that writes to a file and let the FileMonitor do its thing. So, how do I do this using EasyMock? I just don't get how to have EasyMock mock the file system.

Thanks, Todd

© Stack Overflow or respective owner

Related posts about java

Related posts about easymock