[When(@"I add a new user")] public void WhenIAddANewUser(Table table) { table.AddRow("John", "Doe", "20"); }
[When(@"I add multiple users")] public void WhenIAddMultipleUsers(Table table) { table.AddRow("John", "Doe", "20"); table.AddRow("Jane", "Doe", "25"); }This code adds two new rows to the "table" object, each with a different set of values. These examples use the TechTalk.SpecFlow package library. This library provides the Table class and other classes and methods needed to work with tables in SpecFlow tests.