Title: [1298] trunk/core/distribution/src/site/content/table-examples.html: Clarified use of named parameters and annotation patterns for table examples.
Revision
1298
Author
mauro
Date
2009-10-08 05:03:08 -0500 (Thu, 08 Oct 2009)

Log Message

Clarified use of named parameters and annotation patterns for table examples.

Modified Paths

Diff

Modified: trunk/core/distribution/src/site/content/table-examples.html (1297 => 1298)

--- trunk/core/distribution/src/site/content/table-examples.html	2009-10-07 22:43:07 UTC (rev 1297)
+++ trunk/core/distribution/src/site/content/table-examples.html	2009-10-08 10:03:08 UTC (rev 1298)
@@ -39,11 +39,20 @@
 repeated for as many times as there are data rows in the examples table.
 At each execution, the named parameters are taken from the corresponding
 row.</p>
+<p>One important difference to underline in using table examples is
+that they require <a href=""
+parameters</a> for the candidate steps to be matched to Java methods. The
+named parameters allow the parameters to be injected using the table row
+values with the corresponding header name, instead of being extracted
+from the annotation pattern match. As such, <b>the step annotation pattern
+must hold the verbatim textual step</b>. e.g.:</p>
+<pre class="brush: java">
+    @Given("a stock of symbol [symbol] and a threshold of [threshold]")
+    public void aStock(@Named("symbol") String symbol, @Named("threshold") double threshold) {
+        // ...
+    }
+</pre>
 
-<p>Note that use of table examples requires more <a
-    href="" named parameters</a> for the
-candidate steps to be matched to Java methods.</p>
-
 <div class="clear">
 <hr />
 </div>


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to