A second look at Unit Testing with Roy Osherove at Microsoft Swit

797 views

Published on

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

No Downloads
Views
Total views
797
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
15
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

A second look at Unit Testing with Roy Osherove at Microsoft Swit

  1. 1. • Unit Of Work• Setup Methods• Constrained vs.Unconstrained IsolationFrameworks• Principles of GoodIsolation Frameworks• Faking Deep Legacy is OK• Six Influence Forces• Beautiful Builds
  2. 2. ProductionCodeUnit Of WorkReturnValue/ExceptionNoticeable StateChange3rd Party callPublicAPITest
  3. 3. ProductionCodeUnit Of WorkReturnValue/ExceptionPublicAPIAssert Test
  4. 4. ProductionCodeUnit Of WorkNoticeable StateChangeTestPublicAPIAssert
  5. 5. ProductionCodeUnit Of Work3rd Party callTestPublicAPI3rd PartyUnit Of Work
  6. 6. ProductionCodeUnit Of Work3rd Party callTestPublicAPI3rd PartyUnit Of Work
  7. 7.  Recursive is not explicit: Person.Manager.Manager isalready a fake instance withoutasking for it Chained Expectations areexplicit Mock.Arrange(() =>Person.Manager.Manager).Returns(fakeManager)
  8. 8. Old code
  9. 9. Old code FakeNewcode
  10. 10. Extract Scrip
  11. 11. Build Chain TriggersTriggered by checkinTriggered by end of previoManualManualBuild Chaining
  12. 12. • Unit Of Work• Setup Methods• Constrained vs.Unconstrained IsolationFrameworks• Principles of GoodIsolation Frameworks• Faking Deep Legacy is OK• Six Influence Forces• Beautiful Builds

×