March 2016
Intermediate to advanced
304 pages
8h 9m
English
The where: block, introduced in chapter 3, is responsible for holding all input and output parameters for a parameterized test. It can be combined with all other blocks shown in chapter 4, but it has to be the last block inside a Spock test, as illustrated in figure 5.2. Only an and: block might follow a where: block (and that would be rare).

The simpler given-expect-when structure was shown in listing 5.2. This works for trivial and relatively simple tests. The more usual way (and the recommended ...
Read now
Unlock full access