mock de la muerte
Post on 21-Jan-2017
267 Views
Preview:
TRANSCRIPT
mock de la muertefree 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 doubledummy 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
top related