i m finding it diff to assert my out params

2009-05-19
2013-04-25
  • komal sharma

    komal sharma - 2009-05-19

    my test case is as follows:

    <test name="running test 2" failure-message="Failed to run test 2">
      <call connection-id="1">
        <stmt>{call pcs.pcs_get_pkg.get_prog_prod(?,?,?)}</stmt> 
         <param id="1" name="org_id" type="NUMERIC">10</param>
         <param id="2" name="prod_id" type="NUMERIC">1030</param> 
         <param id="3" name="progprod_cur" type="CURSOR" inout="out">${progprod_cur}</param>   
      </call>
      <result>
        <outparam id="3" type="CURSOR">
       <resultset id="1">
       <row id="1">
         <col id="1" name="PROG_PROD_NAME" type="VARCHAR">AMP Reading</col>
         <col id="2" name="PROG_PROD_ID " type="NUMERIC">1030</col>
         <col id="3" name="DEFAULT_SUBJECT_ID " type="NUMERIC">4</col>
         <col id="4" name="ISBN_ID" type="VARCHAR">NULL</col>
         <col id="5" name="COPYRIGHT" type="VARCHAR">NULL</col>
         <col id="6" name="DISPLAY_ORDER_BY" type="NUMERIC">NULL</col>
       </row>
    </resultset>    
        </outparam>
      </result>
    </test>

    the problem i m facing is that i have to write the complete result set, is der a way where i can jus assert if out parameter is not null. lik i dont want to write the complete result set i jus want to assert if the procedure returns data ???

     
    • Sujit Pal

      Sujit Pal - 2009-05-28

      Hi Komal, its been a very long time since I looked at the SQLUnit code (I was the original author, but the project is now being managed by someone else), but I remember that I had provided a way to do exactly what you ask - its in the user guide.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks