Goal: learn about the various types of test doubles
There are bugs in the code (marked with a Bug!
comment), but all the
tests are passing.
For each test, you will find a TODO
comment. Your job
is to implement a test double for each test, and to use it
to make the test fail for the right reason, i.e, triggering
the bugs. You must do so by adding only test code - you
are not allowed to change the production code.
For this step, you are not allowed to use an external library. You have to implement the interfaces "by hand".
Use a library like mockito
to rewrite all the tests.
Which version do you prefer?