Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
mock de la muerte
free thoughts about testing
Q?
Why am I good at testing “Game of Life”
but clueless with a legacy class?
A!
Because of TDD!
TDD! TDD!
(yes, ok. enough?)
So. What’s a Mock?
“ Mocks are
NOT .
Stubs ”
M. Fowler
Ok. What’s a Stub?
Stub is controlled fake
Mock is a verified stub
Roy Osherove
Fake? What’s a Fake?
test double
dummy object
test stub
test spy
mock object
fake object
temporary test stub
G. Meszaros
WTF?
Mock:
- Injected in SUT ( fixture )
- Partecipates in pass/fail decision ( verify )
Unit Test should be
F.I.R.S.T
(Bob Martin, Clean Code)
Mind map
http://tinyurl.com/cdsmock
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Mock de la muerte
Upcoming SlideShare
Loading in …5
×

Mock de la muerte

314 views

Published on

Aggiornamento Agile June 2016 - Club degli Sviluppatori Puglia. Free thoughts about testing, mocking and isolation

Published in: Software

Mock de la muerte

  1. 1. mock de la muerte free thoughts about testing
  2. 2. Q? Why am I good at testing “Game of Life” but clueless with a legacy class?
  3. 3. A! Because of TDD! TDD! TDD! (yes, ok. enough?)
  4. 4. So. What’s a Mock?
  5. 5. “ Mocks are NOT . Stubs ” M. Fowler
  6. 6. Ok. What’s a Stub?
  7. 7. Stub is controlled fake Mock is a verified stub Roy Osherove
  8. 8. Fake? What’s a Fake?
  9. 9. test double dummy object test stub test spy mock object fake object temporary test stub G. Meszaros
  10. 10. WTF?
  11. 11. Mock: - Injected in SUT ( fixture ) - Partecipates in pass/fail decision ( verify )
  12. 12. Unit Test should be F.I.R.S.T (Bob Martin, Clean Code)
  13. 13. Mind map http://tinyurl.com/cdsmock

×