Hi everyone,
I'd like some advice/opinions on how to test some existing code. It's a web
application using Spring and struts.
I have a class called the ProcessedFilesManager which contains a number of
methods used by Struts Action classes. This manager communicates with five
different DAOs to get the information that some of the Struts actions are
interested in. Now, I want to test this manager class
(ProcessedFilesManager). The way I've started doing it is stubbing up each
of the five DAOs, however, this is proving to be quite painful. I didn't
want to use a mocking approach, nor did I want to use a DB solution like
Hypersonic, but now I'm open to suggestions.
Seeing as there a number of approaches I could use, what do you think would
be best for this situation?
It feels wrong to stub the DAOs because what if I'm introducing behaviour in
there that differs from the actual DAOs? My tests will not be accurate.
Any advice/comments would be much appreciated.
- annie
[Non-text portions of this message have been removed]