|
Email Answering System Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--test.ManagedConnectionUnitTest
Unit test for the email resource adapter managed connection.
Field Summary | |
protected ArrayList |
mEvents
Event history. |
protected ManagedConnection |
mManagedConnection
The managed connection used in the tests. |
protected EmailManagedConnectionFactory |
mManagedConnectionFactory
The managed connection factory used to create the managed connections used in the tests. |
Constructor Summary | |
ManagedConnectionUnitTest(String testName)
Construct a ManagedConnection test. |
Method Summary | |
protected void |
addEvent(String name,
ConnectionEvent event)
Add an event to the event history |
protected void |
clearEvents()
Clear out the event history. |
void |
connectionClosed(ConnectionEvent event)
Method called when a connection is closed. |
void |
connectionErrorOccurred(ConnectionEvent event)
Method called when a connection error occurs. |
void |
localTransactionCommitted(ConnectionEvent event)
Method called when a local transaction is committed. |
void |
localTransactionRolledback(ConnectionEvent event)
Method called when a local transaction is rolled back. |
void |
localTransactionStarted(ConnectionEvent event)
Method called when a local transaction is started. |
static void |
main(String[] args)
Mainline for the ManagedConnection. |
protected void |
setUp()
Create a managed connection. |
protected String |
showBytes(byte[] data)
Create a string representation of an array of bytes. |
static junit.framework.Test |
suite()
Create the suite of tests for the ManagedConnection. |
void |
test2Cleanups()
Test calling the cleanup method twice. |
void |
testAssociateConnection()
Test the associate connection method. |
void |
testCleanup()
Test the cleanup method. |
void |
testConnectionListener()
Test the listener methods. |
void |
testDestroy()
Test the destroy method. |
void |
testGetConnection()
Test the get connection method. |
void |
testGetConnectionWithSubject()
Test the get connection method. |
void |
testGetMetaData()
Test the get meta data method. |
void |
testLogWriter()
Test the logWriter property. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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 EmailManagedConnectionFactory mManagedConnectionFactory
protected ManagedConnection mManagedConnection
protected ArrayList mEvents
Constructor Detail |
public ManagedConnectionUnitTest(String testName)
testName
- the name of the testMethod Detail |
public static junit.framework.Test suite()
protected void setUp()
setUp
in class junit.framework.TestCase
protected void addEvent(String name, ConnectionEvent event)
name
- The mnemonic of the method recieving the event.event
- The event received.protected void clearEvents()
public void connectionErrorOccurred(ConnectionEvent event)
connectionErrorOccurred
in interface ConnectionEventListener
event
- The error event information.public void localTransactionStarted(ConnectionEvent event)
localTransactionStarted
in interface ConnectionEventListener
event
- The transaction event information.public void localTransactionCommitted(ConnectionEvent event)
localTransactionCommitted
in interface ConnectionEventListener
event
- The transaction event information.public void connectionClosed(ConnectionEvent event)
connectionClosed
in interface ConnectionEventListener
event
- The connection close event information.public void localTransactionRolledback(ConnectionEvent event)
localTransactionRolledback
in interface ConnectionEventListener
event
- The transaction event information.protected String showBytes(byte[] data)
data
- The data to display.
public void testLogWriter()
public void testGetConnection()
public void testGetConnectionWithSubject()
public void testGetMetaData()
public void testConnectionListener()
connectionErrorOccurred
,
localTransactionStarted
, localTransactionCommitted
,
and localTransactionRolledback
.
public void testAssociateConnection()
public void testCleanup()
public void test2Cleanups()
public void testDestroy()
public static void main(String[] args)
args
- JUnit arguments, optionally prefixed by a JUnit test runner class name.
The default is junit.swingui.TestRunner, but other possibilities include:junit.textui.TestRunner
junit.awtui.TestRunner
|
Email Answering System Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |