Raising the Value of Your Unit Tests
summary
Argues that output verification tests (inputs → expected outputs) catch the most regressions, while collaboration verification is brittle; covers state verification too. Shows concrete code: a ToDo app where a constructor assigns a GUID (tests check ID type/length), a ViewModel wired to an IToDoItemDataStore tested with a hand-rolled mock (mentions Moq), using MSTest and Visual Studio, recommending DI, avoid statics, SOLID, max one mock per test, and a three-part naming convention (unit_initial_expected). Live code demo and repo (develop branch) accompany the talk.
AI-written summary · about
chapters (11)
- 0:00Introduction and background
- 2:10Why write unit tests
- 7:11Unit testing styles explained
- 10:23What makes a test valuable
- 15:30Making tests clear and simple
- 21:29Writing testable code
- 26:24High-value test scenarios
- 31:24Test by scenarios not methods
- 32:52Live code demonstration
- 50:48Resources and summary
- 52:57Q&A on unit testing challenges








