<TestSet>
    <testName>UnitTest</testName>
    <description>
        <p>Tests for the Unit Test runner itself </p>
        <p>Unusually, some tests are designed to fail because they are testing that errors are
            detected!</p>
    </description>
    <author>Chris Wallace</author>
    <test>
        <task>Test equal text</task>
        <code>"red"</code>
        <expected>red</expected>
    </test>
    <test>
        <task>Test equal xml</task>
        <code>&lt;node&gt;x&lt;/node&gt;</code>
        <expected type="xml">
            <node>x</node>
        </expected>
    </test>
    <test>
        <task>Test Contains</task>
        <code> "this is a string which contains red " </code>
        <expected type="contains">red</expected>
    </test>
    <test>
        <task>Test Multiple Contains</task>
        <code>"this is a string which contains red " </code>
        <expected type="contains">red</expected>
        <expected type="contains">which</expected>
    </test>
    <test>
        <task>Test omits</task>
        <code> "this is a string which does not contain the complement of green" </code>
        <expected type="omits">red</expected>
    </test>
    <test>
        <task>Check XQuery code </task>
        <code>let $x := 5 * 6 return $x</code>
        <expected>30</expected>
    </test>
    <test>
        <task>Check XQuery code failing </task>
        <code>let $x := 5 * 6 return $x</code>
        <expected>31</expected>
    </test>
    <test>
        <task>Return complex XML</task>
        <code>
 let $good := 
     &lt;TrafficLights&gt; 
           &lt;band  min="0" colour="red"/&gt;
           &lt;band min="6" colour="orange"/&gt;
          &lt;band min="10" colour="green"/&gt;
     &lt;/TrafficLights&gt; 
 return $good 

   </code>
        <expected>
            <TrafficLights>
                <band min="0" colour="red"/>
                <band min="6" colour="orange"/>
                <band min="10" colour="green"/>
            </TrafficLights>
        </expected>
    </test>
    <test>
        <task>Return complex XML - not as expected</task>
        <code>
 let $good := 
     &lt;TrafficLights&gt; 
           &lt;band  min="0" colour="red"/&gt;
           &lt;band min="6" colour="orange"/&gt;
          &lt;band min="10" colour="green"/&gt;
     &lt;/TrafficLights&gt; 
 return $good 

   </code>
        <expected>
            <TrafficLights>
                <band min="0" colour="red"/>
                <band min="6" colour="orange"/>
                <band min="10" colour="purple"/>
            </TrafficLights>
        </expected>
    </test>
</TestSet>