Fish & Chips Club 4.10.0.0

hirondelle.fish.main.member
Class TESTMemberDAO

Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by hirondelle.fish.main.member.TESTMemberDAO
All Implemented Interfaces:
junit.framework.Test

public class TESTMemberDAO
extends junit.framework.TestCase

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

TESTMemberDAO

public TESTMemberDAO(String aName)
Method Detail

main

public static void main(String[] args)
                 throws ServletException,
                        FileNotFoundException
Initialize the environment and run the test cases.

Throws:
ServletException
FileNotFoundException

testRealDAO

public void testRealDAO()
                 throws DAOException,
                        ModelCtorException
Test the real DAO.

Throws:
DAOException
ModelCtorException

testFakeDAO

public void testFakeDAO()
                 throws DAOException,
                        ModelCtorException
Test the fake DAO, without configuring explicit failures for any of its operations.

Throws:
DAOException
ModelCtorException

testFakeDAOFailure

public void testFakeDAOFailure()
                        throws DAOException,
                               ModelCtorException
Test the fake DAO, with configuring explicit failures for all its operations. One of the advantages of using

Throws:
DAOException
ModelCtorException

Fish & Chips Club 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.26