Document Possible Bugs with Tests – code cast
Blog post series
This is a code cast in Java.
In the previous episodes we reach the moment when we extracted one simple class. We used the The Rule of Three and pure functions. This newly extracted class is covered with characterization tests. Then we wrote some unit tests in the following episode. But some of the behaviours seemed strange, and we thought they might be bugs.
Because we are never sure when working on existing code if some behaviour is a bug or a feature, we want to document all the suspicious cases. In order to do that, I am presentin three methods: use an annotation, prefix the test, use a diffent class.
Bug or feature? Check out the code cast to see all of them in action.
Read here more about this concept in my blog post.