Code Smell 133 - Hardcoded IF Conditions
TL;DR: Don't leave a hardcoded mess on IFs.
Problems
Testability
Hardcoded values
Open/Closed Principle Violation
Solutions
Replace all IFs with a dynamic condition or polymorphism.
Context
Hard-coding iF conditions is great when doing Test-D...
maximilianocontieri.com2 min read
Miki Szeles
Everything related to test automation
Great post, Maxi!
Is there any magic number from which it is better to use a map than an if? For example I have 2 mappings(0->false, 1-> true) only and I am sure I won't need more. Would you use dictionary in that case too?