DAOTest¶
-
public abstract class
DAOTest
<T extends DataSourceDAO> extends UnitTest<T>¶ The
DAOTest
is base class for testing DAO.Author: Twinsen Tsang
Parameters: - <T> – The class which implements DataSourceDAO.
See also:
DataSourceDAO
Fields¶
daoFactory¶
-
protected DAOFactory
daoFactory
¶
Constructors¶
Methods¶
commitSQL¶
createDAOContainer¶
getTableName¶
initTestTarget¶
-
public synchronized void
initTestTarget
()¶ Initialize the test target for this test-case. A Special piazza common module is constructed during this initialization. We will call the module as a container of our test-case because the
DAO
can only be constructed throughDAOFactory
. Moreover, we have to create the database table and insert some SQL for testing because of non-persistence database has been adopted for performing unit-testing.