DEV Community

Discussion on: Keeping your code clean by sweeping out "if" statements

Collapse
 
elmardott profile image
Elmar Dott

Hey Tomaz
A very nice article. You described some effects I figuerd out after I started TDD.
In many cases, after I performed a code coverage I had discovered many if statements simply a good initial idea but completly unneccesary.
You solution using a Map is nice. I had chosen for me Enums to allow a reuse.

regrads ED