List of Listings
Chapter 1. Introducing the Spock testing framework
Listing 1.1. Sample Spock test
Listing 1.2. Java class under test and JUnit test
Listing 1.3. Spock test for the Adder Java class
Listing 1.4. A JUnit test for two Java classes
Listing 1.5. Spock test for two Java classes
Listing 1.6. Introducing an artificial bug in the Java class under test
Listing 1.7. A JUnit test with method names unrelated to business value
Listing 1.8. A Spock test with methods that explain the business requirements
Chapter 2. Groovy knowledge for Spock testing
Listing 2.1. Groovy class conventions
Listing 2.2. Groovy field conventions
Listing 2.3. A complete Groovy script
Get Java Testing with Spock now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.