Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Complex Refactoring in Simple Steps: Part II [Video]

DZone's Guide to

Complex Refactoring in Simple Steps: Part II [Video]

Matthew Butt demonstrates how to compose simple automated refactoring steps in ReSharper to refactor code to better designs.

· DevOps Zone ·
Free Resource

In response to accelerated release cycles, a new set of testing capabilities is now required to deliver quality at speed. This is why there is a shake-up in the testing tools landscape—and a new leader has emerged in the just released Gartner Magic Quadrant for Software Test Automation.

Matthew Butt demonstrates how to compose simple automated refactoring steps in ReSharper to refactor code to better designs.

In this episode, we spot a conditional with three branches. We decompose this conditional to clarify the logic, then extract method objects to encapsulate the behaviour of each branch. By the time we've finished, we are well on our way to implementing polymorphism.

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

This article was first published on the Codurance blog.

Gartner: Digital Transformation, DevOps, and the Future of Testing. Download Now! 

Topics:
complex refactoring ,resharper ,devops ,polymorphism

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}