unit testing - Create a combination on input in Spock test -
in spock test current block
where: [a,b,c] << [ ["a1","b1","c1"], ["a1","b1","c2"], ]
i trying simplify since input , b same. trying use combinations() have been unsuccessful.
i want same job code above.
where: [[a,b],[c]] << // incorrect [ [["a1","b1"],["c1","c2"]].combinations() // incorrect ]
currently npe
here 1 solution:
where: [a, b, c] << [[["a1","b1"]],["c1","c2"]].combinations()*.flatten()
Comments
Post a Comment