org.opensubsystems.security.persist.db
Class ExternalSessionDatabaseFactoryTest.ExternalSessionDatabaseFactoryTestInternal

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.security.persist.db.SecureDatabaseTest
                  extended by org.opensubsystems.security.persist.db.ExternalSessionDatabaseFactoryTest.ExternalSessionDatabaseFactoryTestInternal
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
ExternalSessionDatabaseFactoryTest

public static class ExternalSessionDatabaseFactoryTest.ExternalSessionDatabaseFactoryTestInternal
extends SecureDatabaseTest

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.security.persist.db.ExternalSessionDatabaseFactory m_externalSessionFactory
          Factory to manage external sessions.
protected  org.opensubsystems.security.persist.db.InternalSessionDatabaseFactory m_sessionFactory
          Factory to manage internal sessions.
protected  org.opensubsystems.security.persist.db.SessionDatabaseSchema m_sessionSchema
          Schema for database dependent operations.
protected  org.opensubsystems.security.persist.db.UserDatabaseFactory m_userFactory
          Factory to manage users.
 
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
ExternalSessionDatabaseFactoryTest.ExternalSessionDatabaseFactoryTestInternal(java.lang.String strTestName)
           
 
Method Summary
 void testCheckUniqueConstraint()
          Test for checking if there will be thrown unique constraint exception
 void testCreate()
          Test for creation of external session creating
 void testDelete()
          Test for deleting external session
 void testDeleteById()
          Test for deleting external session deleting just knowing ID
 void testDeleteByServer()
          Test for deleting external session deleting just knowing server identification
 void testGetAllById()
          Test for getting all external sessions knowing just the internal session id
 void testGetAllByInternalSession()
          Test for getting all external sessions knowing just the internal session generated code.
 void testGetById()
          Test for getting external session knowing just the external session id
 
Methods inherited from class org.opensubsystems.security.persist.db.SecureDatabaseTest
setUp, tearDown
 
Methods inherited from class org.opensubsystems.core.persist.db.DatabaseTest
addDataSource, addDataSource, getDataSourceName, setDataSourceName
 
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_sessionSchema

protected org.opensubsystems.security.persist.db.SessionDatabaseSchema m_sessionSchema
Schema for database dependent operations.


m_userFactory

protected org.opensubsystems.security.persist.db.UserDatabaseFactory m_userFactory
Factory to manage users.


m_sessionFactory

protected org.opensubsystems.security.persist.db.InternalSessionDatabaseFactory m_sessionFactory
Factory to manage internal sessions.


m_externalSessionFactory

protected org.opensubsystems.security.persist.db.ExternalSessionDatabaseFactory m_externalSessionFactory
Factory to manage external sessions.

Constructor Detail

ExternalSessionDatabaseFactoryTest.ExternalSessionDatabaseFactoryTestInternal

public ExternalSessionDatabaseFactoryTest.ExternalSessionDatabaseFactoryTestInternal(java.lang.String strTestName)
                                                                              throws java.lang.Exception
Parameters:
strTestName - - name of the test
Throws:
java.lang.Exception - - an error has occured
Method Detail

testGetById

public void testGetById()
                 throws java.lang.Exception
Test for getting external session knowing just the external session id

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

testGetAllByInternalSession

public void testGetAllByInternalSession()
                                 throws java.lang.Exception
Test for getting all external sessions knowing just the internal session generated code.

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

testGetAllById

public void testGetAllById()
                    throws java.lang.Exception
Test for getting all external sessions knowing just the internal session id

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

testCreate

public void testCreate()
                throws java.lang.Exception
Test for creation of external session creating

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

testCheckUniqueConstraint

public void testCheckUniqueConstraint()
                               throws java.lang.Exception
Test for checking if there will be thrown unique constraint exception

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

testDelete

public void testDelete()
                throws java.lang.Exception
Test for deleting external session

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

testDeleteById

public void testDeleteById()
                    throws java.lang.Exception
Test for deleting external session deleting just knowing ID

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

testDeleteByServer

public void testDeleteByServer()
                        throws java.lang.Exception
Test for deleting external session deleting just knowing server identification

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


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