Email Answering System
Version 1.0

test
Class ResourceAdapterUnitTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--test.ResourceAdapterUnitTest
All Implemented Interfaces:
junit.framework.Test

public class ResourceAdapterUnitTest
extends junit.framework.TestCase

Unit test for the email resource adapter.

Author:
Derrick Oswald

Field Summary
protected  byte[] mCoffin
          The serialized connection factory object.
 
Constructor Summary
ResourceAdapterUnitTest(String testName)
           
 
Method Summary
 Serializable deserialize(byte[] bytes)
          Deserialize an object.
static void main(String[] args)
           
 byte[] serialize(Serializable object)
          Serialize an object.
protected  void setUp()
           
static junit.framework.Test suite()
           
protected  void tearDown()
           
 
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

mCoffin

protected byte[] mCoffin
The serialized connection factory object.

Constructor Detail

ResourceAdapterUnitTest

public ResourceAdapterUnitTest(String testName)
Method Detail

suite

public static junit.framework.Test suite()

setUp

protected void setUp()
Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

serialize

public byte[] serialize(Serializable object)
                 throws IOException
Serialize an object.

Parameters:
object - The object to be serialized.
Returns:
The bytes corresponding to the serialized object.
Throws:
IOException - If the serialization process has an error.

deserialize

public Serializable deserialize(byte[] bytes)
                         throws ClassNotFoundException,
                                IOException
Deserialize an object.

Parameters:
bytes - The bytes corresponding to the serialized object.
Returns:
The deserialized object.
Throws:
ClassNotFoundException - If the class of the serialized object cannot be found or loaded.
IOException - If the deserialization process has an error.

main

public static void main(String[] args)

Email Answering System
Version 1.0

Copyright © 2003 Derrick Oswald. All rights reserved.