org.opensubsystems.security.logic
Class RoleControllerTest.RoleControllerTestInternal

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.logic.RoleControllerTest.RoleControllerTestInternal
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
RoleControllerTest

public static class RoleControllerTest.RoleControllerTestInternal
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.AccessRightDatabaseFactory m_rightFactory
          Factory to manage access rights.
protected  org.opensubsystems.security.logic.RoleController m_roleControl
          Controller to manage roles.
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.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
RoleControllerTest.RoleControllerTestInternal(java.lang.String strTestName)
          Constructor
 
Method Summary
 void testCopyRoles()
          Test for copyRoles method in controller
 void testCreate()
          Test of create methods in controller
 void testCreateSelfRegistrationRole()
          Test of createSelfRegistrationRole methods in controller
 void testDelete()
          Test of delete role methods in controller
 void testDeleteMultiple()
          Test of delete multiple roles methods in controller
 void testGet()
          Test of get methods in controller
 void testGetAllRolesInDomain()
          test of getAllRolesInDomain method
 void testGetList()
          Test of get multiple roles methods in controller
 void testGetOrderedLists()
          Test of getOrderedLists methods in controller
 void testSave()
          Test of save role with differences methods in controller
 void testSaveWithDifferences()
          Test of save with differences methods in controller
 void testUpdateEnableFalse()
          Test of updateEnable methods in controller
 void testUpdateTrue()
          Test of updateEnable methods in controller
 
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, 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_roleControl

protected org.opensubsystems.security.logic.RoleController m_roleControl
Controller to manage roles.


m_roleFactory

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


m_rightFactory

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


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.

Constructor Detail

RoleControllerTest.RoleControllerTestInternal

public RoleControllerTest.RoleControllerTestInternal(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

testGet

public void testGet()
             throws java.lang.Exception
Test of get methods in controller

Overrides:
testGet in class org.opensubsystems.patterns.listdata.persist.db.ListDatabaseFactoryTest
Throws:
java.lang.Exception - - an error has occured

testCreate

public void testCreate()
                throws java.lang.Exception
Test of create methods in controller

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

testSave

public void testSave()
              throws java.lang.Exception
Test of save role with differences methods in controller

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

testSaveWithDifferences

public void testSaveWithDifferences()
                             throws java.lang.Exception
Test of save with differences methods in controller

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

testDelete

public void testDelete()
                throws java.lang.Exception
Test of delete role methods in controller

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

testDeleteMultiple

public void testDeleteMultiple()
                        throws java.lang.Exception
Test of delete multiple roles methods in controller

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

testUpdateTrue

public void testUpdateTrue()
                    throws java.lang.Exception
Test of updateEnable methods in controller

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

testUpdateEnableFalse

public void testUpdateEnableFalse()
                           throws java.lang.Exception
Test of updateEnable methods in controller

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

testGetList

public void testGetList()
                 throws java.lang.Exception
Test of get multiple roles methods in controller

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

testGetOrderedLists

public void testGetOrderedLists()
                         throws java.lang.Exception
Test of getOrderedLists methods in controller

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

testCreateSelfRegistrationRole

public void testCreateSelfRegistrationRole()
                                    throws java.lang.Exception
Test of createSelfRegistrationRole methods in controller

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

testCopyRoles

public void testCopyRoles()
                   throws java.lang.Exception
Test for copyRoles method in controller

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.