1 package org.jadetower.dao.test;
2
3 import junit.framework.*;
4 import org.jadetower.dao.*;
5 import org.jadetower.dao.test.daos.SimpleDAO;
6 import org.jadetower.dao.test.daos.impl.HelloWorldDaoImpl;
7
8 public class SimpleDAOTestCase extends TestCase {
9
10 public SimpleDAOTestCase() {
11 }
12
13
14
15 public void testSimpleDAO() throws Exception {
16 String[] configuration = new String[]{"src/conf/simple-example.xconf"};
17
18 HelloWorldDaoImpl impl = new HelloWorldDaoImpl();
19
20 DaoContainer daoContainer = new DaoContainer(configuration, null, null);
21
22 DaoManager manager = daoContainer.getManager();
23 SimpleDAO simple = (SimpleDAO) manager.getDao("simple");
24
25 String expected = impl.getName();
26 String actual = simple.getName();
27
28 assertEquals("DAO values should be the same "+expected+" = "+actual, expected, actual);
29 }
30
31 }
This page was automatically generated by Maven