我尝试使用BDD范例开始使用SpecFlow进行开发。如果我使用@language en-US
,一切似乎都能正常工作。更改为pl-PL后,代码生成崩溃,如下面的代码片段中所示:
Funkcja: PolishGenerator
Ten feature opisalem po polsku
#error (3:1): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'Funkcja: PolishGenerator'
#error (4:2): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'Ten feature opisalem po polsku'
#error (5:0): unexpected end of file, expected: #TagLine, #FeatureLine, #Comment, #Empty
然而,这很好用:
@language en-US
Feature: SpecFlowFeature1
In order to avoid silly mistakes
经过长时间的谷歌搜索,我只发现法语中与编码相关的错误,但是,即使我只使用与ASCII兼容的字符(没有重音符,特殊字母),它也会以相同的错误结束。此外,使用标准UTF-8-BOM正确编码文件。
如果我使用正确的单词,我已经用gherking-languages.json进行了双重检查,是的,它们似乎没问题。
我正在使用SpecFlow 2.2.1作为nuget包以及Visual Studio 2015 Professional Update 3和SpecFlow for Visual Studio 2015版本2017.1.6