|
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.ConnectionFactoryUnitTest
Unit test for the email resource adapter connection factory.
Field Summary | |
protected EmailConnectionFactory |
mConnectionFactory
The connection factory used in the tests. |
Constructor Summary | |
ConnectionFactoryUnitTest(String testName)
Construct a ConnectionFactory test. |
Method Summary | |
Serializable |
deserialize(byte[] bytes)
Deserialize an object. |
static void |
main(String[] args)
Mainline for the ConnectionFactory. |
byte[] |
serialize(Serializable object)
Serialize an object. |
protected void |
setUp()
Create a connection factory. |
static junit.framework.Test |
suite()
Create the suite of tests for the ConnectionFactory. |
void |
testGetConnection()
Test no-arg get connection method. |
void |
testGetConnectionWithConnectionSpec()
Test get connection using a connection spec. |
void |
testGetMetaData()
Test get metadata method. |
void |
testRecordFactory()
Test get record factory method. |
void |
testSerialization()
Test the serializability of the factory. |
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 EmailConnectionFactory mConnectionFactory
Constructor Detail |
public ConnectionFactoryUnitTest(String testName)
testName
- the name of the testMethod Detail |
public static junit.framework.Test suite()
protected void setUp()
setUp
in class junit.framework.TestCase
public void testGetMetaData()
public void testRecordFactory()
public void testGetConnection()
public void testGetConnectionWithConnectionSpec()
public byte[] serialize(Serializable object) throws IOException
object
- The object to be serialized.
IOException
- If the serialization process has an error.public Serializable deserialize(byte[] bytes) throws ClassNotFoundException, IOException
bytes
- The bytes corresponding to the serialized object.
ClassNotFoundException
- If the class of the serialized object
cannot be found or loaded.
IOException
- If the deserialization process has an error.public void testSerialization()
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 |