Agile Legacy Code

Primary Menu

Tag: HowTo

This is part 2 of a series on refactoring, you should also read part one where we introduce refactorings and why you should do it Doing a refactoring in any BIG project can be a frightening experience, you know that Read More …

After building the Golden Master in the previous iteration we are sure that we wont introduce any bugs during our refactoring phase: we built a safety net that will prevent us form falling into the regression trap. The next refactoring I’m going Read More …

Building a test suite for legacy code can be daunting, so most of us usually approach legacy code in two different ways: If it ain’t broke don’t fix it Refactor without automated tests and hope for the best But there Read More …

Recently I’ve been maintaining a project with poorly written code that, to make it worst, is the core to most of the activities of its users. The project follows the big ball of mud pattern, almost every method is a Read More …

In the last post we talked about Mock Objects and what are the difference between them and Spies. We have almost completed our journey through the all the different types of Test Doubles, in this post we are going explore Read More …

By using Test Spies we can capture all the indirect outputs of our software to check that it is working correctly. Often times, making the assertions for all the outputs in the testing function leads to lot’s of duplicated code that after Read More …

By using Dummy Objects and Test Stubs, we are able to control the inputs of the System Under Test to exercise every part of it during our tests. But of course, not every method that we want to test is going Read More …

In our last post we explored how to use Dummy Objects in order to test our code when we are dealing with objects that are difficult to create. One important restriction on the usage of this kind of test double is Read More …

One common objection that I get while explaining TDD to my colleagues is that they deal with objects that are too complex to be tested in an automated suite. They either have methods that are too complex (too many interactions Read More …

Setting up NUnit 3 in Visual Studio is a simple task, but if you don’t know what you need to do, there are a few ways you can easily get stuck. To help you avoid losing time I put together all the steps you need Read More …