org.opensubsystems.blog.persist.db
Class EntryDatabaseFactoryTest.EntryDatabaseFactoryTestInternal

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.opensubsystems.core.persist.db.DatabaseTest
              extended by org.opensubsystems.blog.persist.db.EntryDatabaseFactoryTest.EntryDatabaseFactoryTestInternal
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
EntryDatabaseFactoryTest

public static class EntryDatabaseFactoryTest.EntryDatabaseFactoryTestInternal
extends org.opensubsystems.core.persist.db.DatabaseTest

Internal class which can be included in other test suites directly without including the above suite. This allows us to group multiple tests together and the execute the DatabaseTestSetup only once


Field Summary
protected  org.opensubsystems.blog.persist.db.BlogDatabaseFactory m_blogFactory
          Factory to manage blogs.
protected  org.opensubsystems.blog.persist.db.BlogDatabaseSchema m_blogSchema
          Schema to manage blogs.
protected  org.opensubsystems.blog.persist.db.EntryDatabaseFactory m_entryFactory
          Factory to manage entries.
 
Fields inherited from class org.opensubsystems.core.persist.db.DatabaseTest
DEFAULT_DB_PASSWORD, DEFAULT_DB_USER, DEFAULT_PROPERTY_FILE, m_connection, m_iRequestedConnectionCount, m_transaction
 
Constructor Summary
EntryDatabaseFactoryTest.EntryDatabaseFactoryTestInternal(java.lang.String strTestName)
          Constructor
 
Method Summary
 void testCreate()
          Test creation of entries.
 void testCreateCollection()
          Test for creating collection of entries
 void testDelete()
          Test Entry deletetion
 void testGetAllEntries()
          Test for getting of all entries
 void testGetAllEntriesNoData()
          Test getting all entries for empty table
 void testGetBlogByNewID()
          Test of get Entry by default NEW_ID
 void testGetEntryByID()
          Test of get Entry by ID
 void testGetEntryByIncorrectID()
          Test of get Entry by incorrect ID
 void testGetLastEntry()
          Test for getting of the last entry
 void testLoadEntry()
          Test of load Entry utility
 void testSave()
          Test of save entry
 
Methods inherited from class org.opensubsystems.core.persist.db.DatabaseTest
addDataSource, addDataSource, getDataSourceName, setDataSourceName, setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_blogSchema

protected org.opensubsystems.blog.persist.db.BlogDatabaseSchema m_blogSchema
Schema to manage blogs.


m_blogFactory

protected org.opensubsystems.blog.persist.db.BlogDatabaseFactory m_blogFactory
Factory to manage blogs.


m_entryFactory

protected org.opensubsystems.blog.persist.db.EntryDatabaseFactory m_entryFactory
Factory to manage entries.

Constructor Detail

EntryDatabaseFactoryTest.EntryDatabaseFactoryTestInternal

public EntryDatabaseFactoryTest.EntryDatabaseFactoryTestInternal(java.lang.String strTestName)
                                                          throws java.lang.Exception
Constructor

Parameters:
strTestName - - name of the test
Throws:
java.lang.Exception - - an error has occured
Method Detail

testCreate

public void testCreate()
                throws java.lang.Exception
Test creation of entries.

Throws:
java.lang.Exception - - an error has occured during test

testCreateCollection

public void testCreateCollection()
                          throws java.lang.Exception
Test for creating collection of entries

Throws:
java.lang.Exception - - an error has occured

testDelete

public void testDelete()
                throws java.lang.Exception
Test Entry deletetion

Throws:
java.lang.Exception - - an error has occured during test

testSave

public void testSave()
              throws java.lang.Exception
Test of save entry

Throws:
java.lang.Exception - - an error has occured during test

testGetEntryByID

public void testGetEntryByID()
                      throws java.lang.Exception
Test of get Entry by ID

Throws:
java.lang.Exception - - an error has occured during test

testGetEntryByIncorrectID

public void testGetEntryByIncorrectID()
                               throws java.lang.Exception
Test of get Entry by incorrect ID

Throws:
java.lang.Exception - - an error has occured during test

testGetBlogByNewID

public void testGetBlogByNewID()
                        throws java.lang.Exception
Test of get Entry by default NEW_ID

Throws:
java.lang.Exception - - an error has occured during test

testGetAllEntries

public void testGetAllEntries()
                       throws java.lang.Exception
Test for getting of all entries

Throws:
java.lang.Exception - - an error has occured during test

testGetAllEntriesNoData

public void testGetAllEntriesNoData()
                             throws java.lang.Exception
Test getting all entries for empty table

Throws:
java.lang.Exception - - an error has occured during test

testGetLastEntry

public void testGetLastEntry()
                      throws java.lang.Exception
Test for getting of the last entry

Throws:
java.lang.Exception - - an error has occured during test

testLoadEntry

public void testLoadEntry()
                   throws java.lang.Exception
Test of load Entry utility

Throws:
java.lang.Exception - - an error has occured during test


Copyright © 2003 - 2007 OpenSubsystems s.r.o.