Archiwa: JUnit - From passion to profession Skip to content →

Tag: JUnit

At the red-green-refactor carousel – implementing conversion unit

After having gestures handled and stored, we are ready to create simple logic for the Conversion Unit. In the following post, I’m going to describe created architecture. All of the code was written with TDD, because one of my goals for “Get noticed 2017” competition is to become more fluent in using TDD as a daily basis. Up till now, it’s going well.

The short introduction for those who are not familiar with TDD. Test Driven Development is a technique where, at the beginning, you write a test that does not compile (red part). When it is ready, then you start to write the code until it passes (green part) written test. At the end of an iteration you should look through the code and do refactoring if needed (refactor part). Good practices show that tests should be as simple as possible. In the ideal world, when a class is completed, then tests cover 100% of its lines.

Leave a Comment