Validating Error Messages
ServiceOrderData error messages are strings that are attached to the sod using the ServiceOrderData::getErrorMessage.
Exact Matching
<test name="test_sod_errmsg_1"> <flow>flow1</flow> <description>Test sod : errorMessages are correctly written to injected sod</description> <inject mod="getSo"> <so orderId="1"> <sod> <errorMessage value="A message"/> </sod> </so> </inject> <expect mod="port1"> <so orderId="1"> <sod> <errorMessage value="A message"/> </sod> </so> </expect> </test>
Regexp Matching
<test name="test_sod_errmsg_6" expr="KO"> <flow>flow1</flow> <description>Test sod : regexp in error message reValue</description> <inject mod="getSo"> <so orderId="1"> <sod> <errorMessage value="An error message"/> </sod> </so> </inject> <expect mod="port1"> <so orderId="1"> <sod> <dataset> <param name="verb" reValue=".*error.*"/> </dataset> </sod> </so> </expect> </test>
Copyright © Cloud Software Group, Inc. All rights reserved.