DRY TDD with AutoFixture
summary
Shows using AutoFixture to remove test setup duplication by applying anonymous data, equivalent sets and a test data builder. Implements Conway’s Game of Life underpopulation rule with three TDD tests (compile fail, minimal green, then rule) and then replaces manual construction with AutoFixture customizations to create one alive solitary cell. Tests become smaller, decoupled from constructors, still pass, and allow changing the API (for example to params) without breaking the test suite.
AI-written summary · about
chapters (22)
- 0:00Intro
- 2:24Premise
- 3:29Fixture
- 7:04Test Setup
- 8:32Unit Test Patterns
- 9:48Equivalent Sets
- 11:38Test Data Builder
- 13:10Conways Game of Life
- 15:59BDD Style Testing
- 17:38First Test
- 19:38Writing the Code
- 21:38Creating the Grid
- 23:03Compile
- 25:08Expressing
- 27:13Test
- 33:23Underpopulation
- 36:18Compilation Error
- 38:08Running the Test
- 39:43Refactoring Tests
- 42:08Testing
- 45:13Customization
- 50:28Conclusion
related talks
58mAsync Lifetime Tests with xUnit and AutoFixture
25mConvert your team into TDD enthusiasts
59mTest Driving Code with the Help of AI
07mTDD/BDD and DI
52mBuilding Operable Software with TDD (but not the way you think)
28mTDD as if You Meant It
01h 13mTDD Revisited
55mTDD and the Terminator - An introduction to Test Driven Development
