(Almost) Frictionless Testing: Removing the Pain from TDD Erik Peterson
Why Does TDD Fail? Confusing Record/Playback model Setting up a lot of context Difficulty setting up/tearing down databases
Specifications aka Unit Tests
The Record/Playback Model Solved by the AAA Syntax: Arrange Act Assert
Generating Mocks Solved using reflection Can be retrieved from a dictionary
Mapping Tests aka Integration Tests
My Requirements for an Integration Test 1. The ability to pass sample data into a method so that you can write tests against it
My Requirements for an Integration Test 2. The ability to allow data you don’t care about be dynamically generated behind the scenes so that you don’t have to worry about it
My Requirements for an Integration Test 3. The data generated by the tests should be easy to clean up so that the database is left in a clean state