org.opensubsystems.security.persist.db
Class RoleDatabaseFactoryTest1.RoleDatabaseFactoryTestInternal1

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

public static class RoleDatabaseFactoryTest1.RoleDatabaseFactoryTestInternal1
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.DomainFactory m_domainFactory
          Factory to manage domains.
protected  org.opensubsystems.security.persist.db.RoleDatabaseFactory m_roleFactory
          Factory to manage roles.
protected  TestRoleDatabaseFactoryUtils m_roleFactoryUtils
          Factory utilities to manage roles.
protected  org.opensubsystems.security.persist.db.RoleDatabaseSchema m_roleSchema
          Schema for database dependent operations.
protected  org.opensubsystems.security.persist.db.UserDatabaseFactory m_userFactory
          Factory to manage users.
protected  TestUserDatabaseFactoryUtils m_userFactoryUtils
          Factory utilities 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
RoleDatabaseFactoryTest1.RoleDatabaseFactoryTestInternal1(java.lang.String strTestName)
          Constructor
 
Method Summary
 void testGetActualCount()
          test of getActualCount method
 void testGetAllForDomain()
          test of getAllForDomain method
 void testGetAllForUser()
          test of getAllForUser method
 void testGetAllRolesInDomain()
          test of getAllRolesInDomain method
 void testGetById()
          Test of getRole method by unique ID
 void testGetByIncorrectId()
          Test of get method using incorrect ID
 void testGetList()
          Test of get methods in factory
 void testGetPersonalById()
          Test of getPersonalRole method by unique ID
 void testGetPersonalByIncorrectId()
          Test of getPersonalRole method by incorrect ID
 void testGetRoleByNewId()
          Test of getRole method by default NEW_ID
 void testIsAnyOfSpecifiedPersonalRoleNegative()
          Test of isAnyOfSpecifiedPersonalRole method where roles are only non personal
 void testIsAnyOfSpecifiedPersonalRolePositive()
          Test of isAnyOfSpecifiedPersonalRole method where one role is personal
 void testLoadRole()
          Test of loadRole utility
 
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_domainFactory

protected org.opensubsystems.security.persist.DomainFactory m_domainFactory
Factory to manage domains.


m_roleSchema

protected org.opensubsystems.security.persist.db.RoleDatabaseSchema m_roleSchema
Schema for database dependent operations.


m_roleFactory

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


m_userFactory

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


m_roleFactoryUtils

protected TestRoleDatabaseFactoryUtils m_roleFactoryUtils
Factory utilities to manage roles.


m_userFactoryUtils

protected TestUserDatabaseFactoryUtils m_userFactoryUtils
Factory utilities to manage users.

Constructor Detail

RoleDatabaseFactoryTest1.RoleDatabaseFactoryTestInternal1

public RoleDatabaseFactoryTest1.RoleDatabaseFactoryTestInternal1(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 of getRole method by unique ID

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

testGetPersonalById

public void testGetPersonalById()
                         throws java.lang.Exception
Test of getPersonalRole method by unique ID

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

testGetByIncorrectId

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

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

testGetPersonalByIncorrectId

public void testGetPersonalByIncorrectId()
                                  throws java.lang.Exception
Test of getPersonalRole method by incorrect ID

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

testIsAnyOfSpecifiedPersonalRoleNegative

public void testIsAnyOfSpecifiedPersonalRoleNegative()
                                              throws java.lang.Exception
Test of isAnyOfSpecifiedPersonalRole method where roles are only non personal

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

testIsAnyOfSpecifiedPersonalRolePositive

public void testIsAnyOfSpecifiedPersonalRolePositive()
                                              throws java.lang.Exception
Test of isAnyOfSpecifiedPersonalRole method where one role is personal

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

testGetRoleByNewId

public void testGetRoleByNewId()
                        throws java.lang.Exception
Test of getRole method by default NEW_ID

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

testLoadRole

public void testLoadRole()
                  throws java.lang.Exception
Test of loadRole utility

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

testGetList

public void testGetList()
                 throws java.lang.Exception
Test of get methods in factory

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

testGetActualCount

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

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

testGetAllForUser

public void testGetAllForUser()
                       throws java.lang.Exception
test of getAllForUser method

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

testGetAllForDomain

public void testGetAllForDomain()
                         throws java.lang.Exception
test of getAllForDomain method

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

testGetAllRolesInDomain

public void testGetAllRolesInDomain()
                             throws java.lang.Exception
test of getAllRolesInDomain method

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


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