Home | History | Annotate | Download | only in internal
      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:16 FET 2012 -->
      6 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
      7 <TITLE>
      8 IdentityMapper (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="IdentityMapper (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/IdentityMapper.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/internal/InvokeParameterisedMethod.html" title="class in junitparams.internal"><B>NEXT CLASS</B></A></FONT></TD>
     61 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     62   <A HREF="../../index.html?junitparams/internal/IdentityMapper.html" target="_top"><B>FRAMES</B></A>  &nbsp;
     63 &nbsp;<A HREF="IdentityMapper.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;<A HREF="#constructor_summary">CONSTR</A>&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;<A HREF="#constructor_detail">CONSTR</A>&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.internal</FONT>
     93 <BR>
     94 Class IdentityMapper</H2>
     95 <PRE>
     96 <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
     97   <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>junitparams.mappers.IdentityMapper</B>
     98 </PRE>
     99 <DL>
    100 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../junitparams/DataMapper.html" title="interface in junitparams">DataMapper</A></DD>
    101 </DL>
    102 <HR>
    103 <DL>
    104 <DT><PRE>public class <B>IdentityMapper</B><DT>extends <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><DT>implements <A HREF="../../junitparams/DataMapper.html" title="interface in junitparams">DataMapper</A></DL>
    105 </PRE>
    106 
    107 <P>
    108 A mapper, that maps contents of a file to a set of parameters for test
    109  methods. Basically a CSV with no header and ordering of columns exactly like
    110  the one in the test methods.
    111  
    112  It uses the logic from @Parameters({}) for parsing lines of file, so be sure
    113  the columns in the file match exactly the ordering of arguments in the test
    114  method.
    115 <P>
    116 
    117 <P>
    118 <DL>
    119 <DT><B>Author:</B></DT>
    120   <DD>Pawel Lipinski</DD>
    121 </DL>
    122 <HR>
    123 
    124 <P>
    125 
    126 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
    127 
    128 <A NAME="constructor_summary"><!-- --></A>
    129 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    130 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    131 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    132 <B>Constructor Summary</B></FONT></TH>
    133 </TR>
    134 <TR BGCOLOR="white" CLASS="TableRowColor">
    135 <TD><CODE><B><A HREF="../../junitparams/internal/IdentityMapper.html#IdentityMapper()">IdentityMapper</A></B>()</CODE>
    136 
    137 <BR>
    138 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    139 </TR>
    140 </TABLE>
    141 &nbsp;
    142 <!-- ========== METHOD SUMMARY =========== -->
    143 
    144 <A NAME="method_summary"><!-- --></A>
    145 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    146 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    147 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    148 <B>Method Summary</B></FONT></TH>
    149 </TR>
    150 <TR BGCOLOR="white" CLASS="TableRowColor">
    151 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    152 <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>
    153 <TD><CODE><B><A HREF="../../junitparams/internal/IdentityMapper.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>
    154 
    155 <BR>
    156 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maps file contents to parameters.</TD>
    157 </TR>
    158 </TABLE>
    159 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
    160 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    161 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
    162 <TH ALIGN="left"><B>Methods inherited from class java.lang.<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></TH>
    163 </TR>
    164 <TR BGCOLOR="white" CLASS="TableRowColor">
    165 <TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
    166 </TR>
    167 </TABLE>
    168 &nbsp;
    169 <P>
    170 
    171 <!-- ========= CONSTRUCTOR DETAIL ======== -->
    172 
    173 <A NAME="constructor_detail"><!-- --></A>
    174 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    175 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    176 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    177 <B>Constructor Detail</B></FONT></TH>
    178 </TR>
    179 </TABLE>
    180 
    181 <A NAME="IdentityMapper()"><!-- --></A><H3>
    182 IdentityMapper</H3>
    183 <PRE>
    184 public <B>IdentityMapper</B>()</PRE>
    185 <DL>
    186 </DL>
    187 
    188 <!-- ============ METHOD DETAIL ========== -->
    189 
    190 <A NAME="method_detail"><!-- --></A>
    191 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    192 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    193 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    194 <B>Method Detail</B></FONT></TH>
    195 </TR>
    196 </TABLE>
    197 
    198 <A NAME="map(java.io.Reader)"><!-- --></A><H3>
    199 map</H3>
    200 <PRE>
    201 public <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>
    202 <DL>
    203 <DD><B>Description copied from interface: <CODE><A HREF="../../junitparams/DataMapper.html#map(java.io.Reader)">DataMapper</A></CODE></B></DD>
    204 <DD>Maps file contents to parameters. In your implementation read the data
    205  from the reader. The reader is closed in the framework, so just read it
    206  :)
    207  
    208  While reading transform the data into Object[][], where external
    209  dimension are different parameter sets, and internal dimension is the set
    210  of params per single test call
    211  
    212  You can optionally return Object[] with Strings inside, but each String
    213  must be a string in the same format as what you would normally pass to
    214  &#064;Parameters({})
    215 <P>
    216 <DD><DL>
    217 <DT><B>Specified by:</B><DD><CODE><A HREF="../../junitparams/DataMapper.html#map(java.io.Reader)">map</A></CODE> in interface <CODE><A HREF="../../junitparams/DataMapper.html" title="interface in junitparams">DataMapper</A></CODE></DL>
    218 </DD>
    219 <DD><DL>
    220 
    221 <DT><B>Returns:</B><DD>an array with all parameter sets</DL>
    222 </DD>
    223 </DL>
    224 <!-- ========= END OF CLASS DATA ========= -->
    225 <HR>
    226 
    227 
    228 <!-- ======= START OF BOTTOM NAVBAR ====== -->
    229 <A NAME="navbar_bottom"><!-- --></A>
    230 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
    231 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
    232 <TR>
    233 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
    234 <A NAME="navbar_bottom_firstrow"><!-- --></A>
    235 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
    236   <TR ALIGN="center" VALIGN="top">
    237   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
    238   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
    239   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
    240   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/IdentityMapper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
    241   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
    242   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
    243   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
    244   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
    245   </TR>
    246 </TABLE>
    247 </TD>
    248 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
    249 </EM>
    250 </TD>
    251 </TR>
    252 
    253 <TR>
    254 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    255 &nbsp;PREV CLASS&nbsp;
    256 &nbsp;<A HREF="../../junitparams/internal/InvokeParameterisedMethod.html" title="class in junitparams.internal"><B>NEXT CLASS</B></A></FONT></TD>
    257 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    258   <A HREF="../../index.html?junitparams/internal/IdentityMapper.html" target="_top"><B>FRAMES</B></A>  &nbsp;
    259 &nbsp;<A HREF="IdentityMapper.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
    260 &nbsp;<SCRIPT type="text/javascript">
    261   <!--
    262   if(window==top) {
    263     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
    264   }
    265   //-->
    266 </SCRIPT>
    267 <NOSCRIPT>
    268   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
    269 </NOSCRIPT>
    270 
    271 
    272 </FONT></TD>
    273 </TR>
    274 <TR>
    275 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    276   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
    277 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    278 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
    279 </TR>
    280 </TABLE>
    281 <A NAME="skip-navbar_bottom"></A>
    282 <!-- ======== END OF BOTTOM NAVBAR ======= -->
    283 
    284 <HR>
    285 Copyright &#169; 2012 <a href="http://pragmatists.pl">Pragmatists</a>. All Rights Reserved.
    286 </BODY>
    287 </HTML>
    288