4. @gil_zilberfeld
Step 1: What to test
• What you’re working on
• Bug or feature?
• Logic
• Read it first
• What not to test:
• Multithreading
• Stored procedures
• UI
5. @gil_zilberfeld
Step 2: Get ready
• Pick organization strategy
• Create test projects
• Remove fluff
• VS I’m looking at you
6. @gil_zilberfeld
Step 3: Pick a scenario
• Scenario consists of
• Context
• Logic
• Success criteria
• Pick the simplest scenario
• Say it!
• Name it!
• Assert it!
http://erpstore.codeplex.com/
7. @gil_zilberfeld
Step 4: Identify dependencies
• Read the code
• Constructor parameters
• Fields
• Statics
• Global state
• Mocking strategy
• None
• Where to mock
• How to mock
8. @gil_zilberfeld
Step 5: Simplify design
• Refactor with tools: VS, R#, DevExpress
• Close down regions you’re not going to cover
• Rename fields
• Extract methods
• Manual refactoring works too
• …but more risky