I have a set of behavior tests which should result in the same outcome
def 'behaviour tests for route A'() {
when:
doA();
then:
data == 'Hi'
}
def 'behaviour tests for route B'() {
when:
doB();
then:
data == 'Hi'
}
void doA(){
...
}
void doB(){
...
}
the code looks ugly I would have preferred to use parametrized testing. something alongside this:
@Unroll
def 'behaviour tests for route #name'() {
when:
route
then:
data == 'Hi'
where:
name | route
'A' | doA()
'B' | doB()
}
Is there a way to do it?