﻿<?xml version="1.0" encoding="utf-8"?>
<tests xmlns="http://www.askia.com/ADCUnitTestSchema"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.askia.com/ADCUnitTestSchema http://www.askia.com/Downloads/dev/schemas/adc2.0/UnitTests.xsd">

  <units>

    <test id="contains_checkboxes" description="Should contains a well formatted input checkbox per response" cases="default_multiple">
      <asserts>
        <placeholder>
          <select_nodes xPath="//input">
            <assert_count is="equal" value="5"/>
            <assert_has_attr name="type" value="checkbox"/>
            <assert_match>
              <![CDATA[name="M1 [0-9]+"]]>
            </assert_match>
          </select_nodes>
        </placeholder>
      </asserts>
    </test>

    <test id="contains_select_options" description="When useList=true, should contains &lt;select&gt; with one &lt;option&gt; per response" cases="default_multiple">
      <arrange>
        <properties>
          <property id="useList">
            <value>true</value>
          </property>
        </properties>
      </arrange>

      <asserts>
        <placeholder>
          <select_nodes xPath="//select">
            <assert_exist />
            <assert_has_attr name="name" value="L1"/>
          </select_nodes>
          <select_nodes xPath="//option">
            <assert_count is="equal" value="5"/>
            <assert_match>
              <![CDATA[value="[0-9]+"]]>
            </assert_match>
          </select_nodes>
        </placeholder>
      </asserts>
    </test>

  </units>
    
</tests>

          