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
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
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);
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
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
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
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 =
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));
//
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
9 matches
Mail list logo