|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object junit.framework.Assert junit.framework.TestCase hirondelle.fish.main.member.TESTMemberDAO
public class TESTMemberDAO
JUnit tests for MemberDAO
and MemberDAOFake
.
To run this class, the classpath must contain the database driver.
See TESTAll.initControllerIfNeeded()
as well.
These unit tests exercise the basic sanity of add/fetch/change/delete operations.
There are other operations defined in MemberDAO
, but they aren't tested by this
class. Transactions are not used to rollback the changes to the database.
When all tests succeed, any records created by these tests are automatically deleted towards the end. If the tests fail, however, then it's usually necessary to manually delete records created by these tests.
Constructor Summary | |
---|---|
TESTMemberDAO(String aName)
|
Method Summary | |
---|---|
static void |
main(String[] args)
Initialize the environment and run the test cases. |
void |
testFakeDAO()
Test the fake DAO, without configuring explicit failures for any of its operations. |
void |
testFakeDAOFailure()
Test the fake DAO, with configuring explicit failures for all its operations. |
void |
testRealDAO()
Test the real DAO. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TESTMemberDAO(String aName)
Method Detail |
---|
public static void main(String[] args) throws ServletException, FileNotFoundException
ServletException
FileNotFoundException
public void testRealDAO() throws DAOException, ModelCtorException
DAOException
ModelCtorException
public void testFakeDAO() throws DAOException, ModelCtorException
DAOException
ModelCtorException
public void testFakeDAOFailure() throws DAOException, ModelCtorException
DAOException
ModelCtorException
|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |