Seminar sylabus PV260 (C# group 03)

3 - Acceptance Tests

In this seminar, we will extend our red-green-refactor development cycle from the previous seminar, by adding acceptance tests.

Acceptance tests are our contract between modules and libraries or between developers and product owners or customers.

Our development cycle will now be:

  1. Describe a product feature by acceptance tests.
  2. Implement first acceptance tests and watch it fail.
  3. Do TDD red-green-refactor cycle by adding new tests for code fragments that are necessary for an application until the acceptance test is green.
  4. Repeat.

Exercise - Fizz Buzz

Fizz Buzz is a mathematical game which is played with a group of people. Each person says a number in a sequence, but when the number is a multiple of 3, they have to say "Fizz", when it is a multiple of 5 they have to say "Buzz", and if it is a multiple of both 3 and 5, "FizzBuzz". If someone makes a mistake and it is noticed, they are out.

A typical game might start like: 1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, Fizz Buzz, etc.