方法'Given'的重载没有4个参数-Specflow

Vir*_*rus 3 specflow nuget

我已经安装了specflow。默认情况下,我得到这种情况下要加上两个数字。构建解决方案时,出现这些错误。“方法'Given'的重载不接受4个参数”。我在这里想念什么?这是生成的文件。

public virtual void AddTwoNumbers()
        {
            TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] {
                        "mytag"});
            #line 7
            this.ScenarioSetup(scenarioInfo);
            #line 8
             testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
            #line 9
             testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
            #line 10
             testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
            #line 11
             testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
            #line hidden

            this.ScenarioCleanup();
        }
Run Code Online (Sandbox Code Playgroud)

对于这种情况:

功能:SpecFlowFeature1为避免愚蠢的错误作为数学白痴,我想被告知两个数字的总和

@mytag方案:将两个数字相加,因为我已经在计算器中输入了50,并且已经在计算器中输入了70。

Vir*_*rus 5

这是techtalk.specflow.dll版本的问题。我有1.8.1版本,我用1.9.0代替了,一切正常!谢谢你的建议