O'Reilly logo

Refactoring with Microsoft Visual Studio 2010 by Peter Ritchie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Test driven development

As you start writing new code, you don't want to fall into the same trap as the legacy code you have to deal with. You want this new code to have tests in order to verify changes to it either as the next step in your refactoring or in some future refactoring. With Test-Driven Development ( TDD) you actually make sure you write the tests before you write the code. Let's have another look at our Model View Presenter (MVP) refactoring.

When separating out business logic code from the GUI (Graphical User Interface) we're now able to write tests to verify that business logic independent of the user interfaces tests that can be automated much easier. Before we refactored CreateInvoiceForm, we knew we needed the presenter to create ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required