I have a Delivery Unit Test that fails with a NullPointer exception at the point where it trys to examine the txn.checkpoints.

The test is the default code that is generated when you create a new service.

The txn is created using the default code

Txn txn = new MockVoBuilder().createTxnDeliveryReadyWithXml(xmlData)

Map params = [
"svcDef": svcDef,
"txn": txn

new ServiceInvoker(svcDef).invoke(params)

// Reload the transaction
txn = new TxnQuery()

// Check results
logger.info 'Txn Delivery Checkpoint Results:'

for (TxnCheckpoint cp : txn.checkpoints) {
logger.info ' ' + cp.name + ' - ' + cp.status

it seems that the txn is not reloaded by the query.

As this is out of the box code for a test I'm not sure how to change it to make it work.

Any guidance would be appreciated.



    CommentAdd your comment...