com.mockrunner.connector
Class ConnectorTestModule

java.lang.Object
  extended by com.mockrunner.connector.ConnectorTestModule

public class ConnectorTestModule
extends java.lang.Object

Module for JCA tests.


Constructor Summary
ConnectorTestModule(ConnectorMockObjectFactory mockFactory)
           
 
Method Summary
 java.util.List getCreatedIndexedRecords()
          Returns a list of all created indexed records by delegating to MockRecordFactory.getCreatedIndexedRecords().
 java.util.List getCreatedIndexedRecords(java.lang.String recordName)
          Returns a list of created indexed records that match the specified name by delegating to MockRecordFactory.getCreatedIndexedRecords(String).
 java.util.List getCreatedMappedRecords()
          Returns a list of all created mapped records by delegating to MockRecordFactory.getCreatedMappedRecords().
 java.util.List getCreatedMappedRecords(java.lang.String recordName)
          Returns a list of created mapped records that match the specified name by delegating to MockRecordFactory.getCreatedMappedRecords(String).
 InteractionHandler getInteractionHandler()
          Returns the InteractionHandler.
 java.util.List getInteractionList()
          Returns a list of all created Interaction objects by delegating to MockConnection.getInteractionList().
 void verifyAllInteractionsClosed()
          Verifies that all interactions are closed.
 void verifyConnectionClosed()
          Verifies that the connection is closed.
 void verifyInteractionClosed(int index)
          Verifies that the specified interaction is closed.
 void verifyLocalTransactionCommitted()
          Verifies that the current local transaction was committed.
 void verifyLocalTransactionNotCommitted()
          Verifies that the current local transaction was not committed.
 void verifyLocalTransactionNotRolledBack()
          Verifies that the current local transaction was not rolled back.
 void verifyLocalTransactionRolledBack()
          Verifies that the current local transaction was rolled back.
 void verifyNumberCreatedIndexedRecords(int expected)
          Verifies that expected number of indexed records have been created.
 void verifyNumberCreatedIndexedRecords(java.lang.String recordName, int expected)
          Verifies that expected number of indexed records with the specified name have been created.
 void verifyNumberCreatedMappedRecords(int expected)
          Verifies that expected number of mapped records have been created.
 void verifyNumberCreatedMappedRecords(java.lang.String recordName, int expected)
          Verifies that expected number of mapped records with the specified name have been created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectorTestModule

public ConnectorTestModule(ConnectorMockObjectFactory mockFactory)
Method Detail

getInteractionHandler

public InteractionHandler getInteractionHandler()
Returns the InteractionHandler.

Returns:
the InteractionHandler

getInteractionList

public java.util.List getInteractionList()
Returns a list of all created Interaction objects by delegating to MockConnection.getInteractionList().

Returns:
the List of all created Interaction objects

getCreatedIndexedRecords

public java.util.List getCreatedIndexedRecords()
Returns a list of all created indexed records by delegating to MockRecordFactory.getCreatedIndexedRecords().

Returns:
the List of all created indexed records

getCreatedIndexedRecords

public java.util.List getCreatedIndexedRecords(java.lang.String recordName)
Returns a list of created indexed records that match the specified name by delegating to MockRecordFactory.getCreatedIndexedRecords(String).

Parameters:
recordName - the name of the record
Returns:
the List of matching indexed records

getCreatedMappedRecords

public java.util.List getCreatedMappedRecords()
Returns a list of all created mapped records by delegating to MockRecordFactory.getCreatedMappedRecords().

Returns:
the List of all created mapped records

getCreatedMappedRecords

public java.util.List getCreatedMappedRecords(java.lang.String recordName)
Returns a list of created mapped records that match the specified name by delegating to MockRecordFactory.getCreatedMappedRecords(String).

Parameters:
recordName - the name of the record
Returns:
the List of matching mapped records

verifyConnectionClosed

public void verifyConnectionClosed()
Verifies that the connection is closed.

Throws:
VerifyFailedException - if verification fails

verifyAllInteractionsClosed

public void verifyAllInteractionsClosed()
Verifies that all interactions are closed.

Throws:
VerifyFailedException - if verification fails

verifyInteractionClosed

public void verifyInteractionClosed(int index)
Verifies that the specified interaction is closed.

Parameters:
index - the index of the Interaction
Throws:
VerifyFailedException - if verification fails

verifyNumberCreatedIndexedRecords

public void verifyNumberCreatedIndexedRecords(int expected)
Verifies that expected number of indexed records have been created.

Parameters:
expected - the expected number of indexed records
Throws:
VerifyFailedException - if verification fails

verifyNumberCreatedIndexedRecords

public void verifyNumberCreatedIndexedRecords(java.lang.String recordName,
                                              int expected)
Verifies that expected number of indexed records with the specified name have been created.

Parameters:
recordName - the name of the record
expected - the expected number of indexed records
Throws:
VerifyFailedException - if verification fails

verifyNumberCreatedMappedRecords

public void verifyNumberCreatedMappedRecords(int expected)
Verifies that expected number of mapped records have been created.

Parameters:
expected - the expected number of mapped records
Throws:
VerifyFailedException - if verification fails

verifyNumberCreatedMappedRecords

public void verifyNumberCreatedMappedRecords(java.lang.String recordName,
                                             int expected)
Verifies that expected number of mapped records with the specified name have been created.

Parameters:
recordName - the name of the record
expected - the expected number of mapped records
Throws:
VerifyFailedException - if verification fails

verifyLocalTransactionCommitted

public void verifyLocalTransactionCommitted()
Verifies that the current local transaction was committed.

Throws:
VerifyFailedException - if verification fails

verifyLocalTransactionNotCommitted

public void verifyLocalTransactionNotCommitted()
Verifies that the current local transaction was not committed.

Throws:
VerifyFailedException - if verification fails

verifyLocalTransactionRolledBack

public void verifyLocalTransactionRolledBack()
Verifies that the current local transaction was rolled back.

Throws:
VerifyFailedException - if verification fails

verifyLocalTransactionNotRolledBack

public void verifyLocalTransactionNotRolledBack()
Verifies that the current local transaction was not rolled back.

Throws:
VerifyFailedException - if verification fails