Introducing TDD<br />Bălan Vlad<br />Romsoft S.R.L.<br />
First Unit Test<br />DEMO - Calculator<br />
Red Green Refactor<br /><ul><li>Read and understand requirements
Write test that follows requirements
Watch it fail
Write code that makes test pass
Refactor
Repeat</li></li></ul><li>AAA<br />Arrange<br />Act<br />Assert<br />
What we used<br />Nunit (http://nunit.org)<br />ReSharper(http://jetbrains.org)<br />TestDriven.Net (http://www.testdriven...
Upcoming SlideShare
Loading in …5
×

Introducing TDD

805 views

Published on

Published in: Technology, Travel
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
805
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introducing TDD

  1. 1. Introducing TDD<br />Bălan Vlad<br />Romsoft S.R.L.<br />
  2. 2.
  3. 3. First Unit Test<br />DEMO - Calculator<br />
  4. 4. Red Green Refactor<br /><ul><li>Read and understand requirements
  5. 5. Write test that follows requirements
  6. 6. Watch it fail
  7. 7. Write code that makes test pass
  8. 8. Refactor
  9. 9. Repeat</li></li></ul><li>AAA<br />Arrange<br />Act<br />Assert<br />
  10. 10. What we used<br />Nunit (http://nunit.org)<br />ReSharper(http://jetbrains.org)<br />TestDriven.Net (http://www.testdriven.net)<br />
  11. 11. Work <br />Create a CurrencyConventorclass that knows how to exchange a currency into another currency using an exchange rate.(for example EUR to RON at exchange rate 4.3)<br />Only two tests:<br />When exchange rate is 1.5 and the sum that is going to be changed is 100<br />When exchange rate is 2 and sum is 300<br />
  12. 12. Testing the untestable<br />DEMO<br />
  13. 13. What’s next<br />Mocking frameworks(RhinoMocks, NMock)<br />Dependency injection frameworks(StructureMap,Unity)<br />Other testing frameworks(xUnit, MBUnit, MSUnit)<br />
  14. 14. Questions<br />

×