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 DaoConfTestCase extends TestCase {
9
10 public DaoConfTestCase() {
11 }
12
13
14
15 public void testDaoConfiguration() throws Exception {
16 String[] configuration = new String[]{"src/conf/dao-conf.xconf"};
17
18
19 DaoContainer daoContainer = new DaoContainer(configuration, null, null);
20
21 DaoManager manager = daoContainer.getManager();
22 SimpleDAO simple = (SimpleDAO) manager.getDao("simple");
23
24 String expected = "Hello World!";
25 String actual = simple.getName();
26
27 assertEquals("DAO values should be the same "+expected+" = "+actual, expected, actual);
28 }
29
30 }
This page was automatically generated by Maven