Unit testing, done well, is all about the units. And that raises the question of dependencies. How do we replace dependencies in test, but use the real version in product code.
The first approach people learn is mocks. Mocks are great. They let you test highly-coupled code in units as if it had low coupling. Many teams stop here. This is good enough to get significant value.
But it isn't good enough for me.
I'm going to discuss how treating mocks as a code smell has helped drive good design throughout my products. I'll introduce several alternatives to mocking, each of works better in some set of circumstances. And I will lay out a path that you can follow to continuously get design feedback from your code and improve your design skills rapidly.
Oh, and I suspect we'll also argue a bunch as we explore the topic. This will be a discussion, not a lecture.
- 6:30pm Doors open. Eat, drink and socialize.
- 7:00pm Welcome, Introductions. Presentation.
- 7:45pm Wrap-up / Q&A / Socialize