I started, mentioned early code clean-up and refactoring. It was huge task but quite simply – I just had to keep focus on what I was doing. I implemented all the changes and confirmed that everything was ok with Unite tests. No problem so far!

Then I decided to committed the code to have clean starting point for next step. In first step I just introduced one common interface which base on Template Method pattern and reimplemented all needed concrete classes. After all I had one common interface to use in many places, it simplified many operations and I was able to cut off bunch of unneeded methods.

That was the half of way. The second part was to used custom Enums instead of String constants. I implemented the Enums and started replacing Strings. It was very bored and could introduce accidental bug. Hopefully it didn’t – lots of manual typing without mistake!

I reran the tests to confirm that I didn’t break anything. Done and committed! That was all for today, tomorrow I will still try to simplify the interface. To have less code needed to cover by tests 😉