Design Patterns · Middle · Question 69 of 75

How do you safely refactor legacy code without tests?

Explanation

Characterization tests lock in what the code does today (even bugs). Seams let you inject test doubles.

Further reading

Problem with a question

Design Patterns · Middle · question 69

Test yourself

Take the Design Patterns · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz