Validating the Dataset

Exact Matching

One parameter is set using an explicit index, the other omitts the index, which value is automatically set to "0".

<test name="test_sod_dataset_1">
		<flow>flow1</flow>
		<description>Test sod : dataset parameter setting/validation</description>
		<inject mod="getSo">
			<so orderId="1">
			<sod>
				<attr name="verb" value="setParamEq1"/>
				<dataset>
				<param name="param2" index="0" value="2"/>
				<param name="param3" value="3"/>
				</dataset>
			</sod>
			</so>
		</inject>
		<expect mod="port1">
			<so orderId="1">
			<sod>
				<dataset>
				<param name="param1" index="0" value="1"/>
				<param name="param3" index="0" value="3"/>
				</dataset>
			</sod>
			</so>
		</expect>
	</test>

Regexp Matching

<test name="test_sod_dataset_2">
		<flow>flow1</flow>
		<description>Test sod : dataset parameter setting/validation</description>
		<inject mod="getSo">
			<so orderId="1">
			<sod>
				<attr name="verb" value="setParamEq1"/>
				<dataset>
				<param name="param3" value="3"/>
				</dataset>
				</sod>
			</so>
		</inject>
		<expect mod="port1">
			<so orderId="1">
			<sod>
				<dataset>
				<param name="param3" value="[0-9]"/>
				</dataset>
			</sod>
			</so>
		</expect>
	</test>

Complex Structure/Sequence Matching

<test name="test_sod_dataset_6">
		<flow>flow1</flow>
		<description>Test sod : complex data in dataset</description>
		<inject mod="getSo">
			<so orderId="1">
			<sod>
				<attr name="verb" value="setParamComplex1"/>
				<dataset>
				<complex name="struct1" type="structure"/>
				<complex name="struct1.substruct" type="structure"/>
				<complex name="seq1" type="sequence" length="2"/>
				<param name="struct1.a" value="a"/>
				<param name="struct1.substruct.b" value="b"/>
				<param name="seq1.1" value="aaa"/>
				</dataset>
			</sod>
			</so>
		</inject>
		<expect mod="port1">
			<so orderId="1">
			<sod>
				<dataset>
				<complex name="struct1" type="structure"/>
				<complex name="struct1.substruct" type="structure"/>
				<complex name="seq1" type="sequence"/>
				<param name="struct1.a" value="a"/>
				<param name="struct1.substruct.b" value="b"/>
				<param name="seq1.1" value="aaa"/>
				<complex name="struct2" type="structure"/>
				<complex name="seq2" type="sequence" length="3"/>
				<param name="struct2.a" value="1"/>
				<param name="seq2.1" value="1"/>
				</dataset>
			</sod>
			</so>
		</expect>
	</test>