org.opensubsystems.security.logic
Class SessionControllerTest.SessionControllerTestInternal

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

public static class SessionControllerTest.SessionControllerTestInternal
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_accessRightFactory
          Factory to manage access rights.
protected  org.opensubsystems.security.logic.AuthorizationController m_authorizeControl
          Controller to perform authorization.
protected  org.opensubsystems.security.persist.db.DomainDatabaseFactory m_domainFactory
          Factory to manage domains.
protected  org.opensubsystems.security.persist.db.ExternalSessionDatabaseFactory m_externalSessionFactory
          Factory to manage external sessions.
protected  org.opensubsystems.security.persist.db.RoleDatabaseFactory m_roleFactory
          Factory to manage roles.
protected  org.opensubsystems.security.logic.SessionController m_sessionControl
          Controller to manage sessions.
protected  org.opensubsystems.security.persist.db.InternalSessionDatabaseFactory m_sessionFactory
          Factory to manage internal sessions.
protected  org.opensubsystems.security.logic.UserController m_userControl
          Controller used to manipulate users.
protected  org.opensubsystems.security.persist.UserFactory m_userFactory
          Factory to manage users.
protected  TestUserDatabaseFactoryUtils m_userFactoryUtils
          Factory utilities 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
SessionControllerTest.SessionControllerTestInternal(java.lang.String strTestName)
          Constructor
 
Method Summary
 void testAttach()
          Test for attach method.
 void testCheckLoggedInUser()
          Test for checkLoggedInUser method
 void testDetach()
          Test for detach method
 void testGetSessions()
          Test for getSessiones method
 void testGetUserId()
          Test for getUserId method
 void testLogin()
          Test of the login method
 void testLoginGuest()
          Test for loginGuest method
 void testLoginGuestWithNoGuest()
          Test for loginGuest method without guest enabled
 void testLogout()
          Test for logout method
 void testLogoutDomainsAllow()
          Test for logout all sessions for all specfied domains - in this test we allow logout
 void testLogoutDomainsDeny()
          Test for logout all sessions for all specfied domains - in this test we don't allow logout
 void testLogoutSessions()
          Test for logoutSessions method.
 void testUpdateEnableFalse()
          Test for updateEnable with false parameter.
 void testUpdateEnableFalseAllUsers()
          Test for disabling all users.
 void testUpdateEnableTrue()
          Test for updateEnable with true parameter.
 
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_domainFactory

protected org.opensubsystems.security.persist.db.DomainDatabaseFactory m_domainFactory
Factory to manage domains.


m_userFactory

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


m_sessionFactory

protected org.opensubsystems.security.persist.db.InternalSessionDatabaseFactory m_sessionFactory
Factory to manage internal sessions.


m_externalSessionFactory

protected org.opensubsystems.security.persist.db.ExternalSessionDatabaseFactory m_externalSessionFactory
Factory to manage external sessions.


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_sessionControl

protected org.opensubsystems.security.logic.SessionController m_sessionControl
Controller to manage sessions.


m_userControl

protected org.opensubsystems.security.logic.UserController m_userControl
Controller used to manipulate users.


m_authorizeControl

protected org.opensubsystems.security.logic.AuthorizationController m_authorizeControl
Controller to perform authorization.


m_userFactoryUtils

protected TestUserDatabaseFactoryUtils m_userFactoryUtils
Factory utilities to manage users.

Constructor Detail

SessionControllerTest.SessionControllerTestInternal

public SessionControllerTest.SessionControllerTestInternal(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

testGetSessions

public void testGetSessions()
                     throws java.lang.Exception
Test for getSessiones method

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

testLogin

public void testLogin()
               throws java.lang.Exception
Test of the login method

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

testLoginGuest

public void testLoginGuest()
                    throws java.lang.Exception
Test for loginGuest method

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

testLoginGuestWithNoGuest

public void testLoginGuestWithNoGuest()
                               throws java.lang.Exception
Test for loginGuest method without guest enabled

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

testLogout

public void testLogout()
                throws java.lang.Exception
Test for logout method

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

testAttach

public void testAttach()
                throws java.lang.Exception
Test for attach method.

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

testDetach

public void testDetach()
                throws java.lang.Exception
Test for detach method

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

testLogoutSessions

public void testLogoutSessions()
                        throws java.lang.Exception
Test for logoutSessions method.

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

testUpdateEnableTrue

public void testUpdateEnableTrue()
                          throws java.lang.Exception
Test for updateEnable with true parameter.

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

testUpdateEnableFalse

public void testUpdateEnableFalse()
                           throws java.lang.Exception
Test for updateEnable with false parameter.

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

testUpdateEnableFalseAllUsers

public void testUpdateEnableFalseAllUsers()
                                   throws java.lang.Exception
Test for disabling all users. These shouldn't be disabled because at least 1 superuser has to remain.

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

testCheckLoggedInUser

public void testCheckLoggedInUser()
                           throws java.lang.Exception
Test for checkLoggedInUser method

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

testGetUserId

public void testGetUserId()
                   throws java.lang.Exception
Test for getUserId method

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

testLogoutDomainsAllow

public void testLogoutDomainsAllow()
                            throws java.lang.Exception
Test for logout all sessions for all specfied domains - in this test we allow logout

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

testLogoutDomainsDeny

public void testLogoutDomainsDeny()
                           throws java.lang.Exception
Test for logout all sessions for all specfied domains - in this test we don't allow logout

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


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