PubMob is on indefinite hiatus.
Check back later.

PubMob session: Legacy Dependency Breaking Techniques

Simple techniques to break dependencies making it hard to test

Pick up a few techniques to fix common dependency challenges in your code, things that make it seem impossible to write unit tests.

Upcoming sessions: Please check back later

Session lead: Jeff Langr

Let’s start getting some of your legacy code under control!

In this session, I’ll help you and your team jump-start getting your legacy code under control. Our primary focus will be on writing enough characterization tests around your code so that you feel safe changing it.

As we work through the session, you’ll pick up some key themes for safe handling of legacy code. You’ll probably learn about at least one of the following dependency breaking techniques:

  • Expose static method
  • Extract and override call
  • Parameterize constructor
  • Break out method object
  • Template redefinition (C++)