Validating Attributes
Exact Matching
In this test, when the productName equals "setIsEnabledToTrue", the "getSo" module sets ProductOrderData::isEnabled to true.
<test name="test_pod_attr_1"> <flow>flow1</flow> <description>Test pod : attributes validation</description> <inject mod="getSo"> <so orderId="1"> <sod/> <pod> <attr name="productName" value="setIsEnabledToTrue"/> <attr name="isEnabled" value="0"/> </pod> </so> </inject> <expect mod="port1"> <so orderId="1"> <pod> <attr name="isEnabled" value="1"/> </pod> </so> </expect> </test>
Regexp Matching
<test name="test_pod_attr_2"> <flow>flow1</flow> <description>Test pod : attributes validation</description> <inject mod="getSo"> <so orderId="1"> <sod/> <pod> <attr name="productName" value="setIsEnabledToTrue"/> </pod> </so> </inject> <expect mod="port1"> <so orderId="1"> <pod> <attr name="productName" reValue="set.*"/> </pod> </so> </expect> </test>
Copyright © Cloud Software Group, Inc. All rights reserved.