Brownfield Development: Taming Legacy Code with Better Unit Testing and Microsoft Fakes

Download this episode

Download Video


Working with legacy code is time consuming and risky. One of the most important things you can do in these situations is leverage the power of effective unit testing to help control and define the behavior of the code. But when you are dealing with code that wasn’t designed with testability in mind, this can be very difficult. The tools and techniques you need are different than what you typically use when working in a test-first greenfield world. Visual Studio has a host of capabilities to help navigate this problem space. In addition to traditional unit testing tooling, the Visual Studio Fakes framework provides a powerful way to overcome many of the challenges faced when unit testing legacy code. In this session, we dive deep into how to effectively create unit tests when in a brownfield development environment. We explore how the Fakes framework helps overcome many of the common difficulties faced with legacy code. Attendees of this session walk away with a much better understanding of how Visual Studio unit testing tools can relieve the pain of bending legacy code to your will.

For more information, check out this course on Microsoft Virtual Academy:



Session Type:





Room 243



Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.