Converting switch or multi-conditional statements to Strategy pattern
Strategy pattern allows us to have a separate class for each case. We can then add new case more easily.
In addition, having smaller classes means that my unit testing becomes more focused on testing one particular situation.
Posted By Blogger to HDGEM at 2/07/2017 07:05:00 AM