Email Answering System
Version 1.0

test
Class ConnectionUnitTest

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

public class ConnectionUnitTest
extends junit.framework.TestCase

Unit test for the email resource adapter connection.

Author:
Derrick Oswald

Field Summary
protected  Connection mConnection
          The connection used in the tests.
 
Constructor Summary
ConnectionUnitTest(String testName)
          Construct a Connection test.
 
Method Summary
static void main(String[] args)
          Mainline for the Connection.
protected  void setUp()
          Create a connection.
static junit.framework.Test suite()
          Create the suite of tests for the Connection.
 void test2Closes()
          Test the calling the close method twice.
 void testClose()
          Test the close method.
 void testCreateInteraction()
          Test the create interaction method.
 void testGetMetaData()
          Test get metadata method.
 void testInteractionsVoided()
          Test if interactions are invalidated by the connection close method.
 
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

mConnection

protected Connection mConnection
The connection used in the tests.

Constructor Detail

ConnectionUnitTest

public ConnectionUnitTest(String testName)
Construct a Connection test.

Parameters:
testName - the name of the test
Method Detail

suite

public static junit.framework.Test suite()
Create the suite of tests for the Connection.

Returns:
The suite of tests.

setUp

protected void setUp()
Create a connection.

Overrides:
setUp in class junit.framework.TestCase

testGetMetaData

public void testGetMetaData()
Test get metadata method.


testCreateInteraction

public void testCreateInteraction()
Test the create interaction method.


testClose

public void testClose()
Test the close method.


test2Closes

public void test2Closes()
Test the calling the close method twice.


testInteractionsVoided

public void testInteractionsVoided()
Test if interactions are invalidated by the connection close method.


main

public static void main(String[] args)
Mainline for the Connection. Invoke the JUnit mainline.

Parameters:
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

Copyright © 2003 Derrick Oswald. All rights reserved.