IBM WebSphere Adapters User Manual page 202

Version 6 release 2
Table of Contents

Advertisement

Your adapter may or may not be dependant on "live" data inside the EIS. If so,
you must either return the data to a known state after every test, or create a mock
implementation of the EIS API so that EIS data remains untouched.
setUp()
In the setup method for outbound, perform the following step:
1. Load any schemas (if necessary)
Test
When you have completed the steps for setting up the test, you are ready to call
the CCI interaction and validate the result. The procedure below creates an object,
retrieves it, and validates its content.
In the test method, you will need to do the following things:
Note: These tasks can be delegated to helper methods
1. Create the data and metadata you will be working with (JavaBean, SDO, or
2. Create a DataExchangeFactory for this data type, set the data as the bound
3. Create a StructuredRecord and initialize it, with the Data Exchange Factory and
4. Invoke the adapter's interaction.execute() using JCA CCI semantics
5. Inspect the result of the output, by getting the bound object of the data
1. Create a new WBIRecord.
2. Create a business object, populate it with data, and place it in WBIRecord.
3. Set the appropriate verb in the business object.
4. Call the interaction, capturing the output.
5. Perform the assertions, which include the following:
For a detailed and coded example of this procedure, see
TwineBallInteractionTest.
Inbound
In contrast to the outbound direction, inbound communication is not defined for
unmanaged operation. To test the adapter's inbound capability outside of a JCA
container, you must implement some of the JCA container contracts. These include
the following:
v BootstrapContext – To obtain a reference to a work manager and a timer
v InboundListener and MessageEndpoint – For the listener client
v MessageEndpointFactory – To create endpoints
v WorkManager – To create work instances
v Work – To map to threads
For a detailed and coded example of these contracts, see the TwineBall sample.
196
WebSphere Adapters: WebSphere Adapter Toolkit User Guide
other format).
object
the metadata
exchange factory of the output record.
v Retrieving the object
v Validating the retrieved object against the original data

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Websphere adapter toolkit

Table of Contents