Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

specflow

When I run the unit tests, I'm getting:

One or more step definitions are not implemented yet.
      SpecFlowFeature1Steps.GivenIHaveEnteredIntoTheCalculator(50)Given I have entered 50 into the calculator
like image 787
sashoalm Avatar asked Dec 11 '22 07:12

sashoalm


1 Answers

I had to remove ScenarioContext.Current.Pending(); from all the methods:

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

I didn't realize it was causing the error and I thought it was because of missing step definitions.

Anyway, leaving this in case anyone encounters the same error in the future.

like image 183
sashoalm Avatar answered Apr 27 '23 00:04

sashoalm