SpecFlow.VisualStudio
SpecFlow.VisualStudio copied to clipboard
'go to' not working with Step Definition Style 'Method name - underscores' in german
Given the line
Wenn etwas
in a feature file with language de-DE and the method
[When] public void Wenn_etwas() { }
I can neither use 'go to steps' nor 'go to binding' but running the test is working fine. Renaming 'Wenn' to 'When' in the method name
[When] public void When_etwas() { }
solves the issue but is a bit cumbersome.
We were looking into the option with the underscores. And as we use Dutch, we found the same problem with this language.
The generation and the binding language seem not to correlate.
Actually, the same is true for the MethodNamePascalCase. In this way these options are only available and useful when you use English as a language.
Thinking aloud, how would we resolve this?
When_ versus Wenn_ isn't a matter of CultureInfo, it's code. But it's a convention applied to the method name... so we'd have to check that, or... perhaps we just hardcode a list of these possibilities, as words like "Wenn" aren't going to change anytime soon.
Well, not knowing the inner workings... I thought the [When] Attribute is used to link to the method.
@kuechlerm Do you mean the global setting in the app.config or the feature-file setting with #language:de-DE