Skip to content
MorganPersson edited this page Aug 29, 2012 · 1 revision

So not everyone has english as their primary language so its possible to write in your native language.

NBehave support alot of languages.

All you have to do is add a line to your text files, it must be the first line in the text file!

So, here is a calculator example in swedish

# language: sv
Givet att jag knappat in 5
Och att jag knappat in 4
När jag summerar
Då ska resultatet vara 9

and the attribute to match the Given step looks like this

[Given(@"att jag knappat in $number")]
public void GivenNumber(int number)
{
    //code here
}
Clone this wiki locally