SpecFlow error: One or more step definitions are not implemented yet

SpecFlow error: One or more step definitions are not implemented yet

当我 运行 单元测试时,我得到:

One or more step definitions are not implemented yet.
      SpecFlowFeature1Steps.GivenIHaveEnteredIntoTheCalculator(50)Given I have entered 50 into the calculator

我不得不从所有方法中删除 ScenarioContext.Current.Pending();

    [Given(@"I have entered (.*) into the calculator")]
    public void GivenIHaveEnteredIntoTheCalculator(int p0)
    {
        ScenarioContext.Current.Pending(); // remove this
    }

我没有意识到这是导致错误的原因,我认为这是因为缺少步骤定义。

无论如何,留下这个以防将来有人遇到同样的错误。