-
Notifications
You must be signed in to change notification settings - Fork 9
StorEvil Grammar
davidmfoley edited this page Sep 13, 2010
·
13 revisions
Other similar tools use regular expressions.
In StorEvil, although Regular-Expression matching is supported, matching based on the names of functions is the preferred method:
For example, in order to match the following:
Given I have a savings account with $100
In SpecFlow, and similarly in Cucumber (ignoring the language differences between C# & Ruby), you would write something like this:
[Given("I have a (\\w+) account with $(.*)")]
public void GivenIHaveAccount(string type, decimal amount) { ... }
In StorEvil, you could use similar syntax to the above, OR, you can write it as follows:
public void Given_I_Have_A_accountType_Account_with_amount(string accountType, decimal amount) { ... }