|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
com.xenonsoft.bridgetown.test.aop.transaction.TestJdbcTransactionSession
A unit test to verify the operation of the data source JDBC transaction session object
| Field Summary | |
protected JdbcTransactionContext |
context
|
protected JdbcTransactionSession |
session
Simulate retrieving session from a lookup context e.g JNDI |
| Constructor Summary | |
TestJdbcTransactionSession()
|
|
| Method Summary | |
void |
deleteCurrentAccount(int accountId)
Delete a saving account records from the database |
void |
insertCurrentAccount(int accountId,
java.lang.String accountNumber,
java.lang.String accountName,
double amount)
Insert a new saving account records into the database |
static void |
main(java.lang.String[] args)
Main program |
protected void |
setUp()
|
static junit.framework.Test |
suite()
|
protected void |
tearDown()
|
void |
testTransactionCommit()
Test the data source transaction session and context implementations by inserting some records into the database. |
void |
testTransactionRollback()
Test the data source transaction session and context implementations By trying to begin a transaction twice. |
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected JdbcTransactionSession session
protected JdbcTransactionContext context
| Constructor Detail |
public TestJdbcTransactionSession()
| Method Detail |
public static void main(java.lang.String[] args)
public static junit.framework.Test suite()
protected void setUp()
throws java.lang.Exception
java.lang.Exception
protected void tearDown()
throws java.lang.Exception
java.lang.Exception
public void insertCurrentAccount(int accountId,
java.lang.String accountNumber,
java.lang.String accountName,
double amount)
throws java.sql.SQLException
accountId - accountNumber - accountName - amount -
java.sql.SQLException
public void deleteCurrentAccount(int accountId)
throws java.sql.SQLException
accountId -
java.sql.SQLException
public void testTransactionCommit()
throws java.lang.Exception
java.sql.SQLException
java.lang.Exception
public void testTransactionRollback()
throws java.lang.Exception
java.sql.SQLException
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||