How Unit Testing Saved My Career
summary
Begins with how unit tests give fast feedback and force clearer APIs, claims JUnit and Mockito enable focused unit tests; shows a concrete word-frequency refactor where writing tests pulls cleaning, counting, and printing into small methods; demos mocking an external weather client so the service returns jacket advice without network calls; advocates TDD for quicker iteration, uses parameterized tests with CSV and EnumSource to cover edge cases, and warns that overly complex test setups destroy trust—challenge them, mock heavier, and prefer smaller units.
AI-written summary · about
chapters (23)
- 0:00Introduction
- 1:03Speaker introduction
- 2:07Early programming struggles
- 3:12Unit testing discovery
- 4:17Testable code benefits
- 6:30Bad vs good code example
- 8:15Refactoring through tests
- 10:13Testable code is cleaner
- 11:17Confidence from tests
- 12:21Test-driven development
- 13:05TDD explained
- 15:34Complex test setups
- 16:17Mocking with Mockito
- 18:49Real-world project failure
- 20:33Tests and code quality cycle
- 22:19Breaking the vicious cycle
- 22:41Parameterized tests
- 24:51Enum source in tests
- 27:46Complex test setup issues
- 31:28Challenging test complexity
- 34:04Testing pyramid overview
- 36:16Conclusion and Q&A
- 37:22Q&A with audience
