getgauge / gauge-csharp

Csharp runner for Gauge
https://gauge.org
GNU General Public License v3.0
33 stars 21 forks source link

Enum as Step Parameter #114

Open nehashri opened 7 years ago

nehashri commented 7 years ago

Step parameters should be able to accept Enum as parameters.

enum Days { Sun, Mon, tue, Wed, thu, Fri, Sat };

The step implementation should be able to accept Enum values. The type of parameter should match the Enum name itself in step implementation.

    [Step("The day is <days>")]
    public void checkTodayDate(Days day)
        // Implementation goes here
    }

So in a spec, * The day is "Sun" should accept the value of enum