Presentation

http://slides.com/mzielinski/spock

StringServiceSpec

  1. Write simple test which concatenate two strings

  2. Refactor test to use where: block and data table

  3. Add @Unroll annotation - use variable in test name

  4. Present two other versions of data pipes

  5. Add arguments to test method which shows tuple

ExchangeRateServiceSpec

  1. Create test which retrieve exchange rate for given ccy from external service (Stub)

  2. Create test which check IllegalArgumentException when there is no ccy

  3. Check execution of save method on DatabaseService and verify argument capture of ExchangeRate

BDD

https://bitbucket.otlabs.fr/projects/UCP/repos/hce-microservices/browse/hce/hce-microservices-bdd-tests/src/test/resources/stories/users_api/ccapi_create_new_cc_user.story