You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Akins, Greg" <Gr...@am.sony.com> on 2005/07/26 13:47:40 UTC

Mock for DaoManager

Has anyone written a mock object that implements DaoManager for testing?

I started by writing a specific MockDao that returns a specific Dao
implementation; but wanted something that would use the dao.xml.  Just
wondering if it's been done already.

-greg


Re: Mock for DaoManager

Posted by Larry Meadors <la...@gmail.com>.
I am not sure what you are trying to do here..do you want the DAOs defined 
in the dao.xml, or do you want to return different ones?

It would be a fairly straightforward exercise to build one that mimicked the 
StandardDaoManager class, and exposed the dao maps so you could replace 
them.

What is it that you are trying to accomplish? There may be an easier way...

Larry

On 7/26/05, Akins, Greg <Gr...@am.sony.com> wrote:
> 
> Has anyone written a mock object that implements DaoManager for testing?
> 
> I started by writing a specific MockDao that returns a specific Dao
> implementation; but wanted something that would use the dao.xml. Just
> wondering if it's been done already.
> 
> -greg
> 
>