Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Do you really want to delete this prezi?
Neither you, nor the coeditors you shared it with will be able to recover it again.
Make your likes visible on Facebook?
Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.
Transcript of TDD
frameworks Tools You want to create great software? with great quality? Maintainable? .Net NUnit MSTest MbUnit .Net RhinoMock Moq Use Test Driven Development! Create a test that describes the behviour you want.
Implement the test in code
Run the test, it should fail! Write the most simple implementation that passes the test
Mock out any external dependencies
Like database, xml, other components! Refactor, not refucktor, the code to be understandable and simple
Refactor both the test and the implementation!
This might introduce new tests! Example TDD Sander van den Berg Something we all know... Shopping Basket Properties: Contains a number of items (products)
items can be added and removed
Each item has an identification, a price per item
and a description. Step 1: create backlog items Translate requirements to sub-features Backlog items:
Dispatch the number of items in the cart
Add item to cart
Remove item from cart
Calculate sum of cart
Show cart contents Golden Rules Do not write any production code unless it is
to implement a test or make a test pass.
Don't write more of a test then needed to fail Don't write more production code than needed to make the test pass! 1. 2. 3. Make a failing test (for one of the tasks) example: count of items of a new ShoppingCart must be 0 Make the test pass, in the simpelest way possible Refactor!