|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.opensubsystems.core.persist.db.DatabaseTest
org.opensubsystems.core.persist.db.connectionpool.DatabaseConnectionFactoryBaseTest
public abstract class DatabaseConnectionFactoryBaseTest
Base class containing tests for general concepts of database connection factories, which every database connection factory shoudl support.
| Field Summary | |
|---|---|
static java.lang.String |
DATASOURCE_NAME_1
Name ot the DataSource 1. |
static java.lang.String |
DATASOURCE_NAME_2
Name ot the DataSource 2 |
static java.lang.String |
DATASOURCE_NAME_ADMIN
Name ot the admin DataSource. |
protected org.opensubsystems.core.persist.db.DatabaseConnectionFactory |
m_connectionFactory
Database connection factory which can be used by test. |
static java.lang.String |
USERNAME_FOR_DS_2
Username for 2nd datasource |
| 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 | |
|---|---|
DatabaseConnectionFactoryBaseTest(java.lang.String strTestName)
Create new DatabaseConnectionFactoryBaseTest. |
|
| Method Summary | |
|---|---|
protected void |
setUp()
Set up environment for the test case. |
protected void |
tearDown()
Restore original environment after the test case. |
void |
testAddDataSourceWithTheSameName()
Test for adding data source with the same name as already has been added. |
void |
testConnectionCountForTwoDataSources()
Test for 2 data sources. |
void |
testCreatingDefaultDataSource()
Test for request connection will create default data source if there wasn't specified. |
void |
testRequestConnectionByUserAndPassword()
Test for requesting connection by user and password. |
void |
testRequestConnectionCount()
Test for request connection - if there is connection requested, request counter has to increase. |
void |
testRequestConnectionCountByDataSource()
Test for getting data source specified by name. |
void |
testRequestConnectionCountByDataSourceWithUserAndPasswd()
Test for getting data source specified by name. |
void |
testRequestConnectionCountForSpecifiedDataSource()
Test for connection count that is specified by data source |
void |
testRequestConnectionFromTwoDataSources()
Test for requesting connection implicitly without specifying user name and password. |
void |
testRequestConnectionFromTwoDataSourcesByUserAndPassword()
Test for requesting connection explictly by user and password. |
void |
testReturnConnectionCount()
Test for return connection - if there is connection returned, request counter has to decrease. |
| 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 |
|---|
public static final java.lang.String DATASOURCE_NAME_ADMIN
public static final java.lang.String DATASOURCE_NAME_1
public static final java.lang.String DATASOURCE_NAME_2
public static final java.lang.String USERNAME_FOR_DS_2
protected org.opensubsystems.core.persist.db.DatabaseConnectionFactory m_connectionFactory
| Constructor Detail |
|---|
public DatabaseConnectionFactoryBaseTest(java.lang.String strTestName)
strTestName - - name of the test| Method Detail |
|---|
protected void setUp()
throws java.lang.Exception
setUp in class DatabaseTestjava.lang.Exception - - an error has occured during setting up test
protected void tearDown()
throws java.lang.Exception
tearDown in class DatabaseTestjava.lang.Exception - - an error has occured during tearing down up test
public void testCreatingDefaultDataSource()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testRequestConnectionCount()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testRequestConnectionCountForSpecifiedDataSource()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testReturnConnectionCount()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testAddDataSourceWithTheSameName()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testConnectionCountForTwoDataSources()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testRequestConnectionFromTwoDataSources()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testRequestConnectionFromTwoDataSourcesByUserAndPassword()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testRequestConnectionByUserAndPassword()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testRequestConnectionCountByDataSource()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
public void testRequestConnectionCountByDataSourceWithUserAndPasswd()
throws java.lang.Exception
java.lang.Exception - - an error has occured during test
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||