From the course: Cucumber Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Step definitions: First domain object

Step definitions: First domain object

From the course: Cucumber Essential Training

Start my 1-month free trial

Step definitions: First domain object

- It seems like the Menu Management feature steps are still highlighted. Let me go ahead and close the file, double click the feature file, and open it again. And you will notice that my scenario steps are no longer highlighted. This is because Cucumber plugin found a link between each of these scenario steps, and their corresponding Menu Management steps are in the Step Definitions file. Let's go back to the Step Definitions file, and let's go ahead and implement the first method. So, I'm going to delete this auto-generated code, and let's go ahead and create a restaurant menu item. So, what we're going to do here is define a restaurant menu item, call it NewMenuItem. And let's go ahead and create this new menu item. This is the constructor call. And I should be able to pass the name, which is coming here. I'm going to give it a nice name, such as NewMenuItemName. And, for the sake of simplicity, I'm just keeping the price as Integer, but we're going to fix that in another scenario…

Contents