org.opensubsystems.blog.persist.db
Class BlogDatabaseFactoryTest.BlogDatabaseFactoryTestInternal

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.BlogDatabaseFactoryTest.BlogDatabaseFactoryTestInternal
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
BlogDatabaseFactoryTest

public static class BlogDatabaseFactoryTest.BlogDatabaseFactoryTestInternal
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.
 
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
BlogDatabaseFactoryTest.BlogDatabaseFactoryTestInternal(java.lang.String strTestName)
          Constructor
 
Method Summary
 void testCheckUniqueConstraint()
          Test for checking unique constraint for Folder attribute
 void testCreate()
          Test creation of blogs.
 void testCreateCollection()
          Test for creating collection of blogs
 void testDelete()
          Test Blog deletetion
 void testGetAllBlogs()
          Test for getting of all blogs
 void testGetAllBlogsNoData()
          Test getting all blogs for empty table
 void testGetBlogByFolder()
          Test of getting Blog by unique Folder name
 void testGetBlogByID()
          Test of get Blog by ID
 void testGetBlogByIncorrectFolder()
          Test of get Blog by incorrect folder name
 void testGetBlogByIncorrectID()
          Test of get Blog by incorrect ID
 void testGetBlogByNewID()
          Test of get Blog by default NEW_ID
 void testLoadBlog()
          Test of load Blog utility
 void testSave()
          Test of save blog
 
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.

Constructor Detail

BlogDatabaseFactoryTest.BlogDatabaseFactoryTestInternal

public BlogDatabaseFactoryTest.BlogDatabaseFactoryTestInternal(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 blogs.

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

testCreateCollection

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

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

testDelete

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

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

testSave

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

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

testGetBlogByID

public void testGetBlogByID()
                     throws java.lang.Exception
Test of get Blog by ID

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

testGetBlogByIncorrectID

public void testGetBlogByIncorrectID()
                              throws java.lang.Exception
Test of get Blog by incorrect ID

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

testGetBlogByNewID

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

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

testGetBlogByFolder

public void testGetBlogByFolder()
                         throws java.lang.Exception
Test of getting Blog by unique Folder name

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

testGetBlogByIncorrectFolder

public void testGetBlogByIncorrectFolder()
                                  throws java.lang.Exception
Test of get Blog by incorrect folder name

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

testCheckUniqueConstraint

public void testCheckUniqueConstraint()
                               throws java.lang.Exception
Test for checking unique constraint for Folder attribute

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

testGetAllBlogs

public void testGetAllBlogs()
                     throws java.lang.Exception
Test for getting of all blogs

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

testGetAllBlogsNoData

public void testGetAllBlogsNoData()
                           throws java.lang.Exception
Test getting all blogs for empty table

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

testLoadBlog

public void testLoadBlog()
                  throws java.lang.Exception
Test of load Blog utility

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


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