Something I've been running into several times now.
Example:
Scenario: When I flick the switch, different colors appear
Given that the electricity bill is paid
When switch flicked is true
| blue |
| green |
| red |
Then the lightbulb should show red at the end
And the following step definition (Given and When are not relevant for the question):
@When("switchFlicked is {}")
public void switchFlickedIs(boolean isSwitchFlicked, DataTable dataTable) {
DiscoLight.setColours(dataTable.asList());
DiscoLight.setSwitch(isSwitchFlicked);
}
Can both parameters and data tables be used at the same time? If so: how? Because the above will not work.