org.davesag.generica.test
Class CreditCardTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.davesag.generica.test.CreditCardTest
All Implemented Interfaces:
Serializable, Test

public class CreditCardTest
extends TestCase
implements Serializable

CreditCardTest is collection of all of the tests on CreditCards and CreditCard peers.

Since:
Generica 1.0
Version:
CVS Revision $Id: CreditCardTest.java,v 1.13 2004/04/03 11:22:50 davesag Exp $
Author:
Dave Sag http://www.davesag.com
See Also:
Serialized Form

Field Summary
static Session SESSION
          the hibernate session
static SessionFactory SESSION_FACTORY
          the hibernate session factory
 
Constructor Summary
CreditCardTest()
          null constructor
CreditCardTest(String name)
          constructor that takes a test name
 
Method Summary
 void setUp()
          set up the hibernate session factory.
static Test suite()
          the test suite
 void tearDown()
          tear down the hibernate session.
 void testCreateEditAndDeleteCreditCard()
          tests that we can create a card, save it, and delete it.
 void testCreateEditAndDeleteOtherCreditCard()
          tests that we can create a different card, save it, and delete it.
 void testInit()
          just tests that set up and tear down work okay.
 String toString()
          the test name
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SESSION_FACTORY

public static SessionFactory SESSION_FACTORY
the hibernate session factory


SESSION

public static Session SESSION
the hibernate session

Constructor Detail

CreditCardTest

public CreditCardTest()
null constructor


CreditCardTest

public CreditCardTest(String name)
constructor that takes a test name

Parameters:
name - the name of this suite of tests
Method Detail

testInit

public void testInit()
just tests that set up and tear down work okay.


testCreateEditAndDeleteCreditCard

public void testCreateEditAndDeleteCreditCard()
tests that we can create a card, save it, and delete it.


testCreateEditAndDeleteOtherCreditCard

public void testCreateEditAndDeleteOtherCreditCard()
tests that we can create a different card, save it, and delete it.


setUp

public void setUp()
           throws Exception
set up the hibernate session factory.

Throws:
Exception - if anything went wrong.

tearDown

public void tearDown()
              throws Exception
tear down the hibernate session.

Throws:
Exception - if anything went wrong.

suite

public static Test suite()
the test suite

Returns:
the test suite.

toString

public String toString()
the test name

Returns:
the test name


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.