I'm creating a test that uses an input XML and want to test the presence of an element and the right attributes of the said element. Having difficulty getting this to work right, however.
This is what I've setup:
<x:scenario label="Scenarios for testing Choice handling">
<x:context href="input.xml"></x:context>
<x:scenario label="Choices with DataElements">
<x:expect label="Abstract class in the uml:Model with an isAbstract attribute" test="/xmi:XMI/uml:Model/packagedElement/packagedElement[@name = 'AdditionalExposureDetail']">
<packagedElement xmi:type="uml:Class" xmi:id="..." name="AdditionalExposureDetail" visibility="public" isAbstract="true">...</packagedElement>
</x:expect>
The idea is that the output transformation will contain an element at /xmi:XMI/uml:Model/packagedElement/packagedElement[@name = 'AdditionalExposureDetail'] (it does) and the element will have the right attribute signature. After many, many iterations however I cannot get it to work - the latest one gives an empty node-set as the result, even though running the transformation manually, the XPath is correct!
What am I doing wrong?