Home | History | Annotate | Download | only in junitparams
      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      2 <!--NewPage-->
      3 <HTML>
      4 <HEAD>
      5 <!-- Generated by javadoc (build 1.6.0_31) on Tue May 15 23:03:17 FET 2012 -->
      6 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
      7 <TITLE>
      8 DataMapper (JUnitParams 0.5.1-SNAPSHOT API)
      9 </TITLE>
     10 
     11 <META NAME="date" CONTENT="2012-05-15">
     12 
     13 <LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
     14 
     15 <SCRIPT type="text/javascript">
     16 function windowTitle()
     17 {
     18     if (location.href.indexOf('is-external=true') == -1) {
     19         parent.document.title="DataMapper (JUnitParams 0.5.1-SNAPSHOT API)";
     20     }
     21 }
     22 </SCRIPT>
     23 <NOSCRIPT>
     24 </NOSCRIPT>
     25 
     26 </HEAD>
     27 
     28 <BODY BGCOLOR="white" onload="windowTitle();">
     29 <HR>
     30 
     31 
     32 <!-- ========= START OF TOP NAVBAR ======= -->
     33 <A NAME="navbar_top"><!-- --></A>
     34 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
     35 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
     36 <TR>
     37 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
     38 <A NAME="navbar_top_firstrow"><!-- --></A>
     39 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
     40   <TR ALIGN="center" VALIGN="top">
     41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
     42   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
     43   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
     44   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DataMapper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
     45   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
     46   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
     47   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
     48   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
     49   </TR>
     50 </TABLE>
     51 </TD>
     52 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
     53 </EM>
     54 </TD>
     55 </TR>
     56 
     57 <TR>
     58 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     59 &nbsp;PREV CLASS&nbsp;
     60 &nbsp;<A HREF="../junitparams/FileParameters.html" title="annotation in junitparams"><B>NEXT CLASS</B></A></FONT></TD>
     61 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     62   <A HREF="../index.html?junitparams/DataMapper.html" target="_top"><B>FRAMES</B></A>  &nbsp;
     63 &nbsp;<A HREF="DataMapper.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
     64 &nbsp;<SCRIPT type="text/javascript">
     65   <!--
     66   if(window==top) {
     67     document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
     68   }
     69   //-->
     70 </SCRIPT>
     71 <NOSCRIPT>
     72   <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
     73 </NOSCRIPT>
     74 
     75 
     76 </FONT></TD>
     77 </TR>
     78 <TR>
     79 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
     80   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
     81 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
     82 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
     83 </TR>
     84 </TABLE>
     85 <A NAME="skip-navbar_top"></A>
     86 <!-- ========= END OF TOP NAVBAR ========= -->
     87 
     88 <HR>
     89 <!-- ======== START OF CLASS DATA ======== -->
     90 <H2>
     91 <FONT SIZE="-1">
     92 junitparams</FONT>
     93 <BR>
     94 Interface DataMapper</H2>
     95 <DL>
     96 <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../junitparams/internal/IdentityMapper.html" title="class in junitparams.internal">IdentityMapper</A></DD>
     97 </DL>
     98 <HR>
     99 <DL>
    100 <DT><PRE>public interface <B>DataMapper</B></DL>
    101 </PRE>
    102 
    103 <P>
    104 Interface to be used by FileParameters'ized test methods. If you want to read
    105  your own format of data from file, implement the map method appropriately.
    106  For CSV files, just skip it.
    107 <P>
    108 
    109 <P>
    110 <DL>
    111 <DT><B>Author:</B></DT>
    112   <DD>Pawel Lipinski</DD>
    113 </DL>
    114 <HR>
    115 
    116 <P>
    117 
    118 <!-- ========== METHOD SUMMARY =========== -->
    119 
    120 <A NAME="method_summary"><!-- --></A>
    121 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    122 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    123 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    124 <B>Method Summary</B></FONT></TH>
    125 </TR>
    126 <TR BGCOLOR="white" CLASS="TableRowColor">
    127 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    128 <CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>[]</CODE></FONT></TD>
    129 <TD><CODE><B><A HREF="../junitparams/DataMapper.html#map(java.io.Reader)">map</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;reader)</CODE>
    130 
    131 <BR>
    132 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maps file contents to parameters.</TD>
    133 </TR>
    134 </TABLE>
    135 &nbsp;
    136 <P>
    137 
    138 <!-- ============ METHOD DETAIL ========== -->
    139 
    140 <A NAME="method_detail"><!-- --></A>
    141 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    142 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    143 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    144 <B>Method Detail</B></FONT></TH>
    145 </TR>
    146 </TABLE>
    147 
    148 <A NAME="map(java.io.Reader)"><!-- --></A><H3>
    149 map</H3>
    150 <PRE>
    151 <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>[] <B>map</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;reader)</PRE>
    152 <DL>
    153 <DD>Maps file contents to parameters. In your implementation read the data
    154  from the reader. The reader is closed in the framework, so just read it
    155  :)
    156  
    157  While reading transform the data into Object[][], where external
    158  dimension are different parameter sets, and internal dimension is the set
    159  of params per single test call
    160  
    161  You can optionally return Object[] with Strings inside, but each String
    162  must be a string in the same format as what you would normally pass to
    163  &#064;Parameters({})
    164 <P>
    165 <DD><DL>
    166 <DT><B>Parameters:</B><DD><CODE>reader</CODE> - 
    167 <DT><B>Returns:</B><DD>an array with all parameter sets</DL>
    168 </DD>
    169 </DL>
    170 <!-- ========= END OF CLASS DATA ========= -->
    171 <HR>
    172 
    173 
    174 <!-- ======= START OF BOTTOM NAVBAR ====== -->
    175 <A NAME="navbar_bottom"><!-- --></A>
    176 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
    177 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
    178 <TR>
    179 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
    180 <A NAME="navbar_bottom_firstrow"><!-- --></A>
    181 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
    182   <TR ALIGN="center" VALIGN="top">
    183   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
    184   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
    185   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
    186   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DataMapper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
    187   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
    188   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
    189   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
    190   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
    191   </TR>
    192 </TABLE>
    193 </TD>
    194 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
    195 </EM>
    196 </TD>
    197 </TR>
    198 
    199 <TR>
    200 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    201 &nbsp;PREV CLASS&nbsp;
    202 &nbsp;<A HREF="../junitparams/FileParameters.html" title="annotation in junitparams"><B>NEXT CLASS</B></A></FONT></TD>
    203 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    204   <A HREF="../index.html?junitparams/DataMapper.html" target="_top"><B>FRAMES</B></A>  &nbsp;
    205 &nbsp;<A HREF="DataMapper.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
    206 &nbsp;<SCRIPT type="text/javascript">
    207   <!--
    208   if(window==top) {
    209     document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
    210   }
    211   //-->
    212 </SCRIPT>
    213 <NOSCRIPT>
    214   <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
    215 </NOSCRIPT>
    216 
    217 
    218 </FONT></TD>
    219 </TR>
    220 <TR>
    221 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    222   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
    223 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    224 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
    225 </TR>
    226 </TABLE>
    227 <A NAME="skip-navbar_bottom"></A>
    228 <!-- ======== END OF BOTTOM NAVBAR ======= -->
    229 
    230 <HR>
    231 Copyright &#169; 2012 <a href="http://pragmatists.pl">Pragmatists</a>. All Rights Reserved.
    232 </BODY>
    233 </HTML>
    234