org.opensubsystems.security.persist.db
Class AccessRightDatabaseFactoryTest.AccessRightDatabaseFactoryTestInternal

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.security.persist.db.SecureDatabaseTest
                  extended by org.opensubsystems.security.persist.db.AccessRightDatabaseFactoryTest.AccessRightDatabaseFactoryTestInternal
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
AccessRightDatabaseFactoryTest

public static class AccessRightDatabaseFactoryTest.AccessRightDatabaseFactoryTestInternal
extends SecureDatabaseTest

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.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.
 
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
AccessRightDatabaseFactoryTest.AccessRightDatabaseFactoryTestInternal(java.lang.String strTestName)
          Constructor.
 
Method Summary
 void testCheckAccess()
          Test of checkAccess method.
 void testCreate()
          Test creation of AccessRight.
 void testCreateCollection()
          Test for creating collection of access rights
 void testCreateList()
          Test creation of AccessRights list.
 void testDeleteAllForRole()
          Test of deleteAllForRole method.
 void testDeleteRights()
          Test of delete method.
 void testGetAllForRole()
          Test of getAllForRole method.
 void testGetAllForRoles()
          Test of getAllForRoles method.
 void testGetById()
          Test of get method by ID
 void testGetForCurrentUser()
          Test of getForCurrentUser method.
 
Methods inherited from class org.opensubsystems.security.persist.db.SecureDatabaseTest
setUp, tearDown
 
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_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_accessRightFactory

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


m_roleFactoryUtils

protected TestRoleDatabaseFactoryUtils m_roleFactoryUtils
Factory utilities to manage roles.

Constructor Detail

AccessRightDatabaseFactoryTest.AccessRightDatabaseFactoryTestInternal

public AccessRightDatabaseFactoryTest.AccessRightDatabaseFactoryTestInternal(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

testCreate

public void testCreate()
                throws java.lang.Exception
Test creation of AccessRight.

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

testCreateList

public void testCreateList()
                    throws java.lang.Exception
Test creation of AccessRights list.

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

testCreateCollection

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

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

testGetById

public void testGetById()
                 throws java.lang.Exception
Test of get method by ID

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

testGetAllForRole

public void testGetAllForRole()
                       throws java.lang.Exception
Test of getAllForRole method.

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

testGetAllForRoles

public void testGetAllForRoles()
                        throws java.lang.Exception
Test of getAllForRoles method.

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

testDeleteAllForRole

public void testDeleteAllForRole()
                          throws java.lang.Exception
Test of deleteAllForRole method.

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

testDeleteRights

public void testDeleteRights()
                      throws java.lang.Exception
Test of delete method.

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

testGetForCurrentUser

public void testGetForCurrentUser()
                           throws java.lang.Exception
Test of getForCurrentUser method.

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

testCheckAccess

public void testCheckAccess()
                     throws java.lang.Exception
Test of checkAccess method.

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


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