Refactoring to Strategy design pattern

In this video I show how to refactor some ugly if-else nested statements using a polymorphic approach via the strategy design pattern. Please note that in this demonstration, I didn’t use code coverage because I just wanted to focus on the pattern it’s self. I hope you enjoy the video.

If you found this useful, please give us some 👏 and follow us.
Originally posted at: