org.opensubsystems.security.persist.db
Class InternalSessionDatabaseFactoryTest.InternalSessionDatabaseFactoryTestInternal

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.patterns.listdata.persist.db.ListDatabaseFactoryTest
                  extended by org.opensubsystems.security.patterns.listdata.persist.db.SecureListDatabaseFactoryTest
                      extended by org.opensubsystems.security.persist.db.InternalSessionDatabaseFactoryTest.InternalSessionDatabaseFactoryTestInternal
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
InternalSessionDatabaseFactoryTest

public static class InternalSessionDatabaseFactoryTest.InternalSessionDatabaseFactoryTestInternal
extends SecureListDatabaseFactoryTest

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.AccessRightDatabaseFactory m_accessRightFactory
          Factory to manage access rights.
protected  org.opensubsystems.security.logic.AuthorizationController m_authorizeControl
          Controller to perform authorization.
protected  org.opensubsystems.security.persist.db.DomainDatabaseFactory m_domainFactory
          Factory to manage domains.
protected  org.opensubsystems.security.persist.db.ExternalSessionDatabaseFactory m_externalSessionFactory
          Factory to manage external sessions.
protected  org.opensubsystems.security.persist.db.RoleDatabaseFactory m_roleFactory
          Factory to manage roles.
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.security.patterns.listdata.persist.db.SecureListDatabaseFactoryTest
m_arrDomainIDs, m_bSecurityDataLoaded
 
Fields inherited from class org.opensubsystems.patterns.listdata.persist.db.ListDatabaseFactoryTest
DEFAULT_LOADTEST_LIST_SIZE, DEFAULT_LOADTEST_LOADTIME, DEFAULT_LOADTEST_PAGE_SIZE, m_listTestUtils, s_iLoadtestListSize, s_iLoadtestLoadTime, s_iLoadtestPageSize
 
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
InternalSessionDatabaseFactoryTest.InternalSessionDatabaseFactoryTestInternal(java.lang.String strTestName)
          Constructor
 
Method Summary
 void testCheckLogoutDomains()
          Test check if all sessions can be logged out from all specfied domains
 void testCheckUniqueConstraint()
          Test for checking if there will be thrown unique constraint exception
 void testCreate()
          Test for creating internal session
 void testDeleteAllOrphans()
          Test all orphaned internal sessions
 void testDeleteById()
          Test for deleting internal session by id
 void testDeleteByInternalSession()
          Test for deleting internal session by session code
 void testDeleteList()
          Test for delete of the list of internal sessions
 void testDeleteListForDomains()
          Test for delete list of internal sessions for all specified domains
 void testGetActualCount()
          test of getActualCount method
 void testGetActualIds()
          test for getting actual internal session IDs (method getActualIds)
 void testGetActualInternalSessions()
          Test for getActualInternalSessions method
 void testGetActualUserCount()
          test of getActualUserCount method
 void testGetById()
          Test for get method with id parameter
 void testGetByInternalSession()
          Test for get method with internal session string parameter
 void testGetCountOfNotContainedSuperUsers()
          Test for getting number of superuser IDs that are not contained within the selected IDs.
 void testUpdateEnable()
          Test for updating and enabling users by session id
 
Methods inherited from class org.opensubsystems.security.patterns.listdata.persist.db.SecureListDatabaseFactoryTest
setUp, tearDown, testLoadPagesFromFirstToLastForMultipleDomains, testLoadPagesFromLastToFirstForMultipleDomains, testLoadPagesRandomForMultipleDomains
 
Methods inherited from class org.opensubsystems.patterns.listdata.persist.db.ListDatabaseFactoryTest
doLoadTestGet, doTestGet, doTestGetColumns, doTestLoadPagesFromFirstToLast, doTestLoadPagesFromLastToFirst, doTestLoadPagesRandom, testGet, testGetColumns, testGetColumnsUsingId, testLoadPagesFromFirstToLast, testLoadPagesFromLastToFirst, testLoadPagesFromLastToFirstMoreSortableColumns, testLoadPagesRandom
 
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_domainFactory

protected org.opensubsystems.security.persist.db.DomainDatabaseFactory m_domainFactory
Factory to manage domains.


m_userFactory

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


m_roleFactory

protected org.opensubsystems.security.persist.db.RoleDatabaseFactory m_roleFactory
Factory to manage roles.


m_accessRightFactory

protected org.opensubsystems.security.persist.db.AccessRightDatabaseFactory m_accessRightFactory
Factory to manage access rights.


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.


m_authorizeControl

protected org.opensubsystems.security.logic.AuthorizationController m_authorizeControl
Controller to perform authorization.

Constructor Detail

InternalSessionDatabaseFactoryTest.InternalSessionDatabaseFactoryTestInternal

public InternalSessionDatabaseFactoryTest.InternalSessionDatabaseFactoryTestInternal(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

testGetById

public void testGetById()
                 throws java.lang.Exception
Test for get method with id parameter

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

testGetByInternalSession

public void testGetByInternalSession()
                              throws java.lang.Exception
Test for get method with internal session string parameter

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

testGetActualIds

public void testGetActualIds()
                      throws java.lang.Exception
test for getting actual internal session IDs (method getActualIds)

Throws:
java.lang.Exception - - error during test

testGetActualCount

public void testGetActualCount()
                        throws java.lang.Exception
test of getActualCount method

Throws:
java.lang.Exception - - error during test

testGetActualUserCount

public void testGetActualUserCount()
                            throws java.lang.Exception
test of getActualUserCount method

Throws:
java.lang.Exception - - error during test

testGetActualInternalSessions

public void testGetActualInternalSessions()
                                   throws java.lang.Exception
Test for getActualInternalSessions method

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

testGetCountOfNotContainedSuperUsers

public void testGetCountOfNotContainedSuperUsers()
                                          throws java.lang.Exception
Test for getting number of superuser IDs that are not contained within the selected IDs.

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

testCreate

public void testCreate()
                throws java.lang.Exception
Test for creating internal session

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

testDeleteById

public void testDeleteById()
                    throws java.lang.Exception
Test for deleting internal session by id

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

testDeleteByInternalSession

public void testDeleteByInternalSession()
                                 throws java.lang.Exception
Test for deleting internal session by session code

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

testDeleteAllOrphans

public void testDeleteAllOrphans()
                          throws java.lang.Exception
Test all orphaned internal sessions

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

testDeleteList

public void testDeleteList()
                    throws java.lang.Exception
Test for delete of the list of internal sessions

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

testDeleteListForDomains

public void testDeleteListForDomains()
                              throws java.lang.Exception
Test for delete list of internal sessions for all specified domains

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

testCheckLogoutDomains

public void testCheckLogoutDomains()
                            throws java.lang.Exception
Test check if all sessions can be logged out from all specfied domains

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

testUpdateEnable

public void testUpdateEnable()
                      throws java.lang.Exception
Test for updating and enabling users by session id

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


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