I have a step in Cucumber/Java feature like this:
Then execution should fail with the response message "At most 20 characters > are allowed."
Underneath that I have:
@When("executin should fail with the response message \"([^\\"]*)\"")
The problem is that I want to use it in many scenarios where the number of characters is changing. Once it's 20 but another time it's 100 or 200.
I've tried something like:
Then execution should fail with the response message "At most (20|100|200) > characters are allowed."
but it doesn't work.
Can anyone plese help how to handle it? Thanks