Writing tests against the mock procedures

The process of writing tests against the mock procedure is identical to writing it for a real database. You can find some examples under test/mock/test.xml in the distribution. Here is one of them, which corresponds to the code shown above for the mock procedure.


<test name="Testing result code and one resultset">
  <call>
    <stmt>resultAndOneResultSet</stmt>
    <param id="1" type="INTEGER" inout="out">${rc}</param>
  </call>
  <result>
    <outparam id="1" type="INTEGER">143</outparam>
    <resultset id="1">
      <row id="1">
        <col id="1" type="INTEGER">7</col>
        <col id="2" type="VARCHAR">James Bond</col>
        <col id="3" type="VARCHAR">Martini</col>
      </row>
    </resultset>
  </result>
</test>