Ah that makes sense. Is there no way then to return a message from a unittest which contains XML? The framework creates the <failure> blocks based on the result of assertions so I don't have control over what is displayed it seems.
On Thu, Dec 5, 2013 at 12:56 PM, Christian Grün christian.gruen@gmail.comwrote:
Hi Joe,
<testcase name="test-element-info" time="PT0.011S"> <failure message="Failed input Input: input Expected: output
Got:
{removed}" type="UNIT0001"/>
</testcase>
What I would like is ".. Expected: <result>output</result> ..." since
what
is being returned is XML.
This is syntactically not possible, because "<" cannot occur in attribute values. The following XML is not well-formed:
<x a="<"/>
However, it’s possible to output the value of an attribute as string, and then skip the entity encoding:
declare option output:method "text"; let $expected := serialize(<a/>) let $xml := <failure message="Expected: { $expected }"/> return $xml/@message/string()
Hope this helps, Christian