Reviewing and testing our refactored code
While we didn’t modify a lot of code in this chapter, the code we did change shrunk in size, thus becoming easier to read, understand, and modify in the process.
This is why we refactor. Refactoring should actively improve the maintainability of our applications and pay down strategic pieces of technical debt that threaten to introduce bugs and delays in the future.
Refactored code
The final refactored code from this chapter is available in the https://github.com/PacktPublishing/Refactoring-with-Csharp repository inside the Chapter03/Ch3RefactoredCode
folder.
Since the art of refactoring involves changing the form of code without changing its functionality, we must test the application before moving on.
We’ll talk more about manual and automated tests in Chapter 6, but for now, run the tests by selecting the Test menu at the top of Visual Studio and then clicking Run All Tests.
This will show Test Explorer and...