Re: Dao unit testing?

2005-02-14 Thread Antony Joseph
From: Nathan Maves [EMAIL PROTECTED] Subject: Dao unit testing? To: ibatis-user-java@incubator.apache.org I have been trying for two day to get DBunit to work with only partial success. The support for this project is nonexistent. Anyone know of a more supported project or have any

Dao unit testing?

2005-02-10 Thread Nathan Maves
I have been trying for two day to get DBunit to work with only partial success. The support for this project is nonexistent. Anyone know of a more supported project or have any experience with this one? How do most of you test your database layer? Nathan

Re: Dao unit testing?

2005-02-10 Thread friendVU admin
I just do JUnit, ex: public static void main(String args[]) { junit.textui.TestRunner.run(ClientDaoTest.class); } public static void testInsert() { Map m = new HashMap(); m.put(ZConst.MODE, ZConst.INSERT); m.put(ZConst.MAPID, MembrSql.insertMember);

Re: Dao unit testing?

2005-02-10 Thread Bostjan Dolenc
Nathan Maves wrote: I have been trying for two day to get DBunit to work with only partial success. The support for this project is nonexistent. Anyone know of a more supported project or have any experience with this one? How do most of you test your database layer? I wrote tests for my

Re: Dao unit testing?

2005-02-10 Thread Kris Jenkins
Nathan Maves wrote: I have been trying for two day to get DBunit to work with only partial success. The support for this project is nonexistent. Anyone know of a more supported project or have any experience with this one? How do most of you test your database layer? I use DBunit, and I'm

Re: Dao unit testing?

2005-02-10 Thread Matt Raible
AppFuse uses DBUnit and you can install iBATIS instead of Hibernate (the default). http://appfuse.dev.java.net Hope this helps, Matt On Feb 10, 2005, at 8:41 AM, Nathan Maves wrote: I have been trying for two day to get DBunit to work with only partial success. The support for this project

Re: Dao unit testing?

2005-02-10 Thread Nathan Maves
Kris, I am really close to getting everything to work with dbunit. Everything works fine from an Ant task. I created my first Junit test and this is where the trouble started. public class UserDaoTest extends DatabaseTestCase { private static Log log =

Re: Dao unit testing?

2005-02-10 Thread Matt Raible
Here's what I've used in the past. protected void setUp() throws Exception { DataSource ds = (DataSource) ctx.getBean(dataSource); conn = new DatabaseConnection(ds.getConnection()); dataSet = new XmlDataSet(new FileInputStream(test/data/sample-data.xml)); //

Re: Dao unit testing?

2005-02-10 Thread Clinton Begin
When it comes to unit testing, I'm all about HSQLDB. :-) Not only do I achieve unit test coverage, but I also improve my portability across databases (if you're interested in that). It also helps triangulate performance issues, as the difference between an in memory DB vs your production DB