This article was originally published over at the Codurance blog.

In the last of three videos, Matthew Butt of Codurance demonstrates how to compose simple automated refactoring steps in ReSharper to refactor code to better designs.

In this episode we identify three classes that are being used in the same way. We introduce a common abstraction, and separate their creation and invocation. Finally, we remove a Middleman class to complete our journey to polymorphism.

From Conditional to Polymorphism

The code used in this video can be found on GitHub.