Alex - 2006-11-03

Hi,

I've just started playing around with SQLUnit.  I'm trying to test an Oracle stored procedure, which (for my simple test) returns only 1 row.  Since it returns 96 columns, I don't need/want to test every single column... so I'm trying to use the partial="true" attribute for the row.  However, the partial attribute doesn't seem to do anything.

The test result:

  [sqlunit] *** expected:
  [sqlunit] <result>
  [sqlunit]   <outparam id="2" type="CURSOR">
  [sqlunit]     <resultset id="1">
  [sqlunit]       <row id="1">
  [sqlunit]         <col id="1" name="PARENT_ID" type="NUMERIC">NULL</col>
  [sqlunit]         <col id="2" name="REQUEST_ID" type="NUMERIC">107414</col>
  [sqlunit]       </row>
  [sqlunit]     </resultset>
  [sqlunit]   </outparam>
  [sqlunit] </result>
  [sqlunit] *** but got:
  [sqlunit] <result>
  [sqlunit]   <outparam id="2" name="request_ref_cur" type="CURSOR">
  [sqlunit]     <resultset id="1">
  [sqlunit]       <row id="1">
  [sqlunit]         <col id="1" name="PARENT_ID" type="NUMERIC">NULL</col>
  [sqlunit]         <col id="2" name="REQUEST_ID" type="NUMERIC">107414</col>
  [sqlunit]         <col id="3" name="SESSION_CD" type="CHAR">POINT_POINT</col>
  [sqlunit]         <col id="4" name="PURPOSE_CD" type="CHAR">OTHER</col>
(....91 more cols ommitted....)
  [sqlunit]         <col id="96" name="APPROVED" type="NUMERIC">1</col>
  [sqlunit]       </row>
  [sqlunit]     </resultset>
  [sqlunit]   </outparam>
  [sqlunit] </result>

My test:

  <test name="try a stored procedure">
  <call>
    <stmt>{call tsm.get_request(?,?)}</stmt>
    <param id="1" name="in_request_id" type="NUMERIC" inout="in">107414</param>
    <param id="2" name="request_ref_cur" type="CURSOR" inout="out">${p_cursor}</param>
  </call>
  <result>
    <outparam id="2" type="CURSOR">
      <resultset id="1">
        <row id="1" partial="true">
     <col id="1" name="PARENT_ID" type="NUMERIC">NULL</col>
     <col id="2" name="REQUEST_ID" type="NUMERIC">107414</col>
        </row>
      </resultset>
    </outparam>
  </result>
  </test>

It's also a bit strange that the test output doesn't show the partial attribute.

Am I missing anything really simple?

Thanks in advance.