org.davesag.generica.test
Class SiteCopyTest

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

public class SiteCopyTest
extends TestCase
implements Serializable

SiteCopyTest is collection of all of the tests on SiteCopys and SiteCopy peers.

Since:
Generica 1.0
Version:
CVS Revision $Id: SiteCopyTest.java,v 1.14 2004/04/06 15:40:42 davesag Exp $
Author:
Dave Sag http://www.davesag.com
See Also:
Serialized Form

Nested Class Summary
protected  class SiteCopyTest.DbSaveAndWait
          Inner class to assist one of the tests that was tripping over itself by running too fast.
protected  class SiteCopyTest.DbWaitAndSave
          Inner class to assist one of the tests that was tripping over itself by running too fast.
 
Field Summary
static Session SESSION
          the hibernate session
static SessionFactory SESSION_FACTORY
          the hibernate session factory
 
Constructor Summary
SiteCopyTest()
          null constructor
SiteCopyTest(String name)
          constructor that takes a test name
 
Method Summary
 void setUp()
          set up hibernate session factory and open session.
static Test suite()
          test suite
 void tearDown()
          close hibernate session.
 void testCreateEditAndDeleteSiteCopy()
          tests that we can create some site copy, edit it and resave it, and delete it.
 void testInit()
          just tests that set up and tear down work okay.
 void testLoadLatest()
          tests that we can load the most recently modified piece of site copy for a particular section.
 void testLoadLatestWithBadLocale()
          tests that we can create some site copy, edit it and resave it, and delete it.
 void testRefernentialIntegrity()
          tests that if we delete an author of a story the story is still a valid object.
 String toString()
          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

SiteCopyTest

public SiteCopyTest()
null constructor


SiteCopyTest

public SiteCopyTest(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.


testCreateEditAndDeleteSiteCopy

public void testCreateEditAndDeleteSiteCopy()
tests that we can create some site copy, edit it and resave it, and delete it.


testLoadLatestWithBadLocale

public void testLoadLatestWithBadLocale()
tests that we can create some site copy, edit it and resave it, and delete it.


testRefernentialIntegrity

public void testRefernentialIntegrity()
tests that if we delete an author of a story the story is still a valid object.


testLoadLatest

public void testLoadLatest()
tests that we can load the most recently modified piece of site copy for a particular section.


setUp

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

Throws:
Exception - if anything went wrong

tearDown

public void tearDown()
              throws Exception
close hibernate session.

Throws:
Exception - if anything went wrong

suite

public static Test suite()
test suite

Returns:
suite of tests

toString

public String toString()
test name

Returns:
name of test


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