I have built a Fluent Delivery service to send email once a form becomes abandoned.
However, I'm having trouble getting the unit test to run. It appears that the checkpoint is not recognising the form status.
The formStatus is read only, so I need to work out how to set the status so that the delivery process takes action.
Is there a way to create an appropriate txn from MockVoBuilder, or is there a way to set the status of the 'test' txn to Abandoned? or even some other approach required?
Any guidance would be appreciated.
You could try using Groovy's map coercion to create your own mock Txn object using something like:
def txn = [formStatus: 'Abandoned' ] as Txn
assert txn.formStatus == 'Abandoned'
This works in the trivial case as above, but I can't guarantee it will work in your more complex unit test.
thanks for the suggestion; I'll give that a try, hopefully that will allow me to make some progress.