O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

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

1.264 visualizações

Publicada em

Publicada em: Tecnologia, Negócios
  • Entre para ver os comentários

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

×