org.opensubsystems.security.logic
Class RoleControllerSecurityTest.RoleControllerSecurityTestInternal

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.logic.ListControllerTest
                  extended by org.opensubsystems.security.patterns.listdata.logic.impl.SecureListControllerTest
                      extended by org.opensubsystems.security.logic.RoleControllerSecurityTest.RoleControllerSecurityTestInternal
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
RoleControllerSecurityTest

public static class RoleControllerSecurityTest.RoleControllerSecurityTestInternal
extends SecureListControllerTest

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_rightFactory
          Factory to manage access rights.
protected  org.opensubsystems.security.logic.RoleController m_roleControl
          Controller used to manipulate roles.
protected  org.opensubsystems.security.persist.RoleFactory m_roleFactory
          Factory to manage roles.
protected  org.opensubsystems.security.persist.UserFactory m_userFactory
          Factory to manage users.
 
Fields inherited from class org.opensubsystems.patterns.listdata.logic.ListControllerTest
m_listTestUtils
 
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
RoleControllerSecurityTest.RoleControllerSecurityTestInternal(java.lang.String strTestName)
          Constructor
 
Method Summary
 void testDeleteMoreCheck()
          Test for deleting of the roles specified by IDs.
 void testDeleteMoreCheckCategoryEnabled()
          Test for deleting of the roles specified by IDs.
 void testDeleteMoreCheckId()
          Test for deleting of the roles specified by IDs.
 void testGetAllForUserCheck()
          Test for getting of all roles for specified user.
 void testGetAllForUserCheckCategoryEnabled()
          Test for getting of all roles for specified user.
 void testGetAllForUserCheckId()
          Test for getting of all roles for specified user.
 void testGetCheck()
          Test for getting of the role.
 void testGetCheckCategoryEnabled()
          Test for getting of the role.
 void testGetCheckId()
          Test for getting of the role.
 void testGetListRolesCheck()
          Test for getting of the list roles.
 void testGetListRolesCheckCategoryEnabled()
          Test for getting of the list roles.
 void testGetListRolesCheckId()
          Test for getting of the list roles.
 void testSaveCheck()
          Test for saving of the role.
 void testSaveCheckCategoryEnabled()
          Test for saving of the role.
 void testSaveCheckId()
          Test for saving of the role.
 void testUpdateEnableCheck()
          Test for update enable of the roles.
 void testUpdateEnableCheckCategoryEnabled()
          Test for update enable of the roles.
 void testUpdateEnableCheckId()
          Test for update enable of the roles.
 
Methods inherited from class org.opensubsystems.security.patterns.listdata.logic.impl.SecureListControllerTest
getListController, setUp, tearDown
 
Methods inherited from class org.opensubsystems.patterns.listdata.logic.ListControllerTest
testGetExactPage, testGetExactPageKeepSelected, testGetNextPage, testGetNextPageKeepSelected, testGetOrderAsc, testGetOrderAscKeepSelected, testGetOrderDesc, testGetOrderDescKeepSelected, testGetPrevPage, testGetSetFilter, testGetSetPageSize, testGetSetPageSizeKeepSelected, testGetShowList, testGetShowListKeepSelected, testGetShowListWithPresetSize, testGetShowListWithPresetSizeKeepSelected
 
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_rightFactory

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


m_roleFactory

protected org.opensubsystems.security.persist.RoleFactory m_roleFactory
Factory to manage roles.


m_userFactory

protected org.opensubsystems.security.persist.UserFactory m_userFactory
Factory to manage users.


m_roleControl

protected org.opensubsystems.security.logic.RoleController m_roleControl
Controller used to manipulate roles.

Constructor Detail

RoleControllerSecurityTest.RoleControllerSecurityTestInternal

public RoleControllerSecurityTest.RoleControllerSecurityTestInternal(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

testGetCheck

public void testGetCheck()
                  throws java.lang.Exception
Test for getting of the role. User have action granted for all data objects of given type (no id and no categories specified when granting access).

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

testGetCheckId

public void testGetCheckId()
                    throws java.lang.Exception
Test for getting of the role. User have access granted to specific data object (identified by identifier) of given data type.

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

testGetCheckCategoryEnabled

public void testGetCheckCategoryEnabled()
                                 throws java.lang.Exception
Test for getting of the role. User have access granted to a group of objects based on categories the objects belong to.

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

testGetListRolesCheck

public void testGetListRolesCheck()
                           throws java.lang.Exception
Test for getting of the list roles. User have action granted for all data objects of given type (no id and no categories specified when granting access).

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

testGetListRolesCheckId

public void testGetListRolesCheckId()
                             throws java.lang.Exception
Test for getting of the list roles. User have access granted to specific data object (identified by identifier) of given data type.

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

testGetListRolesCheckCategoryEnabled

public void testGetListRolesCheckCategoryEnabled()
                                          throws java.lang.Exception
Test for getting of the list roles. User have access granted to a group of objects based on categories the objects belong to.

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

testGetAllForUserCheck

public void testGetAllForUserCheck()
                            throws java.lang.Exception
Test for getting of all roles for specified user. User have action granted for all data objects of given type (no id and no categories specified when granting access).

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

testGetAllForUserCheckId

public void testGetAllForUserCheckId()
                              throws java.lang.Exception
Test for getting of all roles for specified user. User have access granted to specific data object (identified by identifier) of given data type.

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

testGetAllForUserCheckCategoryEnabled

public void testGetAllForUserCheckCategoryEnabled()
                                           throws java.lang.Exception
Test for getting of all roles for specified user. User have access granted to a group of objects based on categories the objects belong to.

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

testSaveCheck

public void testSaveCheck()
                   throws java.lang.Exception
Test for saving of the role. User have action granted for all data objects of given type (no id and no categories specified when granting access).

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

testSaveCheckId

public void testSaveCheckId()
                     throws java.lang.Exception
Test for saving of the role. User have access granted to specific data object (identified by identifier) of given data type.

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

testSaveCheckCategoryEnabled

public void testSaveCheckCategoryEnabled()
                                  throws java.lang.Exception
Test for saving of the role. User have access granted to a group of objects based on categories the objects belong to.

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

testDeleteMoreCheck

public void testDeleteMoreCheck()
                         throws java.lang.Exception
Test for deleting of the roles specified by IDs. User have action granted for all data objects of given type (no id and no categories specified when granting access).

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

testDeleteMoreCheckId

public void testDeleteMoreCheckId()
                           throws java.lang.Exception
Test for deleting of the roles specified by IDs. User have access granted to specific data object (identified by identifier) of given data type.

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

testDeleteMoreCheckCategoryEnabled

public void testDeleteMoreCheckCategoryEnabled()
                                        throws java.lang.Exception
Test for deleting of the roles specified by IDs. User have access granted to a group of objects based on categories the objects belong to.

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

testUpdateEnableCheck

public void testUpdateEnableCheck()
                           throws java.lang.Exception
Test for update enable of the roles. User have action granted for all data objects of given type (no id and no categories specified when granting access).

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

testUpdateEnableCheckId

public void testUpdateEnableCheckId()
                             throws java.lang.Exception
Test for update enable of the roles. User have access granted to specific data object (identified by identifier) of given data type.

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

testUpdateEnableCheckCategoryEnabled

public void testUpdateEnableCheckCategoryEnabled()
                                          throws java.lang.Exception
Test for update enable of the roles. User have access granted to a group of objects based on categories the objects belong to.

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


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