org.opensubsystems.security.persist.db
Class DomainDatabaseFactoryTest.DomainDatabaseFactoryTestInternal

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

public static class DomainDatabaseFactoryTest.DomainDatabaseFactoryTestInternal
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.db.DomainDatabaseFactory m_domainFactory
          Factory to manage domains.
protected  org.opensubsystems.security.persist.db.DomainDatabaseSchema m_domainSchema
          Schema to manage domains.
 
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
DomainDatabaseFactoryTest.DomainDatabaseFactoryTestInternal(java.lang.String strTestName)
          Constructor
 
Method Summary
 void testCheckUniqueConstraint()
          Test for checking if there will be thrown unique constraint exception
 void testCreate()
          Test for creating of the domain
 void testCreateCollection()
          Test for creating collection of domains
 void testDelete()
          Test for deleting of the domain
 void testDeleteByIds()
          Test for deleting domains knowing array of their IDs
 void testExistDomain()
          Test for getting flag signaling existence of an domain within the database
 void testGetActualIds()
          Test for getting actual domain IDs
 void testGetById()
          Test for getting of the domain by id
 void testGetByIncorrectID()
          Test of get method using incorrect ID
 void testGetByName()
          Test for getting of the domain by name
 void testGetMultipleDomains()
          Test for getting multiple domains by IDs
 void testSave()
          Test for modifying of the domain
 void testUpdateEnable()
          Test of updateEnable method
 
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_domainSchema

protected org.opensubsystems.security.persist.db.DomainDatabaseSchema m_domainSchema
Schema to manage domains.


m_domainFactory

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

Constructor Detail

DomainDatabaseFactoryTest.DomainDatabaseFactoryTestInternal

public DomainDatabaseFactoryTest.DomainDatabaseFactoryTestInternal(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 for getting of the domain by id

Throws:
java.lang.Exception - - error occured during getting of the domain

testGetByIncorrectID

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

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

testGetByName

public void testGetByName()
                   throws java.lang.Exception
Test for getting of the domain by name

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

testGetMultipleDomains

public void testGetMultipleDomains()
                            throws java.lang.Exception
Test for getting multiple domains by IDs

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

testExistDomain

public void testExistDomain()
                     throws java.lang.Exception
Test for getting flag signaling existence of an domain within the database

Throws:
java.lang.Exception - - error occured during getting domain

testCreate

public void testCreate()
                throws java.lang.Exception
Test for creating of the domain

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

testCreateCollection

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

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

testCheckUniqueConstraint

public void testCheckUniqueConstraint()
                               throws java.lang.Exception
Test for checking if there will be thrown unique constraint exception

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

testSave

public void testSave()
              throws java.lang.Exception
Test for modifying of the domain

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

testDelete

public void testDelete()
                throws java.lang.Exception
Test for deleting of the domain

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

testGetActualIds

public void testGetActualIds()
                      throws java.lang.Exception
Test for getting actual domain IDs

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

testDeleteByIds

public void testDeleteByIds()
                     throws java.lang.Exception
Test for deleting domains knowing array of their IDs

Throws:
java.lang.Exception - - error occured while deleting more domains

testUpdateEnable

public void testUpdateEnable()
                      throws java.lang.Exception
Test of updateEnable method

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


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