Hi,
well, I think you could use table parameters
(http://jbehave.org/reference/latest/parameters-table.html)
Or as you already note, to create your own parameter converter
(http://jbehave.org/reference/latest/parameter-converters.html)
Personally, I prefer the first approach... Business users is not
obligated to know that a "\n" is line separator, no? :-)
cheers
Cristiano
On 05/10/10 09:21, sud wrote:
Hi all,
I am looking for how to set a multi line input as a parameter in my
step method. So my story looks like below:
Given a text wrapper of line width 10
When I wrap the string The quick brown fox
Then the result is The quick \nbrown fox
The string being passed into my @Then step method as the parameter is
"Then the result is The quick \\nbrown fox"
The "\" is being escaped out. Short of writing a custom parameter is
there is it possible to get JBehave to treat the "\n" without escaping
the "\".
If the only way is to use a custom converter should I pass in each
line in the multi line string as a delimited value and use the custom
converter to replace the delimiter with "\n".
Thanks inadvance for your help.
-sud