Skip to content
MorganPersson edited this page Nov 26, 2012 · 1 revision

To implement a step that has a docstring is pretty simple. The docstring is passed as the last parameter to your step implementation method.

Example:

Given a text spanning multiple lines
  """
  Hello
  I can span
  multiple lines
  """

To get the content of the docstring you implement the step like this:

[Given("a text spanning multiple lines")]
public void StepImpl(string docStringParam)
{
  Assert.AreEqual(@"Hello
I can span
multiple lines", docStringParam);
}
Clone this wiki locally