org.opensubsystems.security.persist.db
Class UserDatabaseFactoryTest.UserDatabaseFactoryTestInternal

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

public static class UserDatabaseFactoryTest.UserDatabaseFactoryTestInternal
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.InternalSessionDatabaseFactory m_sessionFactory
          Factory to manage internal sessions.
protected  org.opensubsystems.security.persist.db.UserDatabaseFactory m_userFactory
          Factory to manage users.
protected  org.opensubsystems.security.persist.db.UserDatabaseSchema m_userSchema
          Schema for database dependent operations.
 
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
UserDatabaseFactoryTest.UserDatabaseFactoryTestInternal(java.lang.String strTestName)
          Constructor
 
Method Summary
 void testCheckForInternalEnabledUsers()
          Test checkForInternalEnabled function
 void testCheckUniqueConstraint()
          Test for checking if there will be thrown unique constraint exception.
 void testCreate()
          Test for creating user
 void testCreateCollection()
          Test for creating collection of user
 void testDelete()
          Test for deleting user
 void testDeleteAllExceptSpecified()
          Test for deleting all users except the specified ones
 void testDeleteByIds()
          Test for deleting users knowing array of their IDs
 void testGetActualCount()
          Test for getting actual number of users
 void testGetActualIds()
          Test for getting actual user IDs
 void testGetById()
          Test for getting user knowing just the ID of the user
 void testGetByIncorrectID()
          Test of get method using incorrect ID
 void testGetByLoginName()
          Test for getting user knowing just the login name of the user
 void testGetCountOfNotContainedSuperUsers()
          Test for getting number of superuser IDs that are not contained within the selected IDs.
 void testGetWithoutCheckingDomain()
          Test of getWithoutCheckingDomain method
 void testSave()
          Test for updating user
 void testSaveWithNoPasswordChange()
          Test for updating user without updating his password
 void testUpdateEnable()
          Test for enabling and disabling users
 
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_userSchema

protected org.opensubsystems.security.persist.db.UserDatabaseSchema m_userSchema
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.

Constructor Detail

UserDatabaseFactoryTest.UserDatabaseFactoryTestInternal

public UserDatabaseFactoryTest.UserDatabaseFactoryTestInternal(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 getting user knowing just the ID of the user

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

testGetByIncorrectID

public void testGetByIncorrectID()
                          throws java.lang.Exception
Test of get method using incorrect ID

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

testGetByLoginName

public void testGetByLoginName()
                        throws java.lang.Exception
Test for getting user knowing just the login name of the user

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

testGetActualIds

public void testGetActualIds()
                      throws java.lang.Exception
Test for getting actual user IDs

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

testGetWithoutCheckingDomain

public void testGetWithoutCheckingDomain()
                                  throws java.lang.Exception
Test of getWithoutCheckingDomain method

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

testGetActualCount

public void testGetActualCount()
                        throws java.lang.Exception
Test for getting actual number of users

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 user

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

testCreateCollection

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

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. There will be check separately LOGIN NAME and EMAIL ADDRESS.

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

testSave

public void testSave()
              throws java.lang.Exception
Test for updating user

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

testSaveWithNoPasswordChange

public void testSaveWithNoPasswordChange()
                                  throws java.lang.Exception
Test for updating user without updating his password

Throws:
java.lang.Exception - - error occured while updating user

testDelete

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

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

testDeleteByIds

public void testDeleteByIds()
                     throws java.lang.Exception
Test for deleting users knowing array of their IDs

Throws:
java.lang.Exception - - error occured while deleting more users

testDeleteAllExceptSpecified

public void testDeleteAllExceptSpecified()
                                  throws java.lang.Exception
Test for deleting all users except the specified ones

Throws:
java.lang.Exception - - error occured while deleting more users

testUpdateEnable

public void testUpdateEnable()
                      throws java.lang.Exception
Test for enabling and disabling users

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

testCheckForInternalEnabledUsers

public void testCheckForInternalEnabledUsers()
                                      throws java.lang.Exception
Test checkForInternalEnabled function

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


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