Tutorial: Automated unit testing

The best way to learn how to build and execute a unit test is to try an example.

Modify POProcessing to add a unit test, which sets the inbound message, the simulation message, and two assertions. The inbound message is a valid order with a valid credit card and order total between 1000 and 5000. This triggers the approveLargeOrder process but not the human task.

The simulated message is the message returned from the credit validation service as a VALID response.

The first assertion is on the data being passed to the WriteFile service, checking that the value of status = 'approved', which is the expected value for this input data.

The second assertion is on the data being passed to FulfillmentProcess, checking that ...

Get Getting Started With Oracle SOA Suite 11g R1 - A Hands-On Tutorial now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.