SpecFlow.VisualStudio icon indicating copy to clipboard operation
SpecFlow.VisualStudio copied to clipboard

'go to' not working with Step Definition Style 'Method name - underscores' in german

Open kuechlerm opened this issue 11 years ago • 4 comments

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.

kuechlerm avatar Jan 21 '14 14:01 kuechlerm

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.

rvugt avatar Oct 08 '14 10:10 rvugt

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.

darrencauthon avatar Oct 08 '14 14:10 darrencauthon

Well, not knowing the inner workings... I thought the [When] Attribute is used to link to the method.

kuechlerm avatar Oct 08 '14 16:10 kuechlerm

@kuechlerm Do you mean the global setting in the app.config or the feature-file setting with #language:de-DE

SabotageAndi avatar Apr 19 '16 17:04 SabotageAndi