Moving from mock to real objects?
Posted
by
jjchiw
on Programmers
See other posts from Programmers
or by jjchiw
Published on 2012-06-25T22:08:56Z
Indexed on
2012/06/26
3:24 UTC
Read the original article
Hit count: 185
I'm like doing TDD so I started everything mocking objects, creating interface, stubbing, great.
The design seems to work, now I'll implement the stuff, a lot of the code used in the stubs are going to be reused in my real implementation yay!
Now should I duplicate the tests to use the real object implementation (but keeping the mocks object of the sensitive stuff like Database and "services" that are out of my context (http calls, etc...)) Or just change the mocks and stubs of the actual tests to use the real objects.......
So the question is that, keep two tests or replace the stubs, mocks?
And after that, I should keep designing with the mocks, stubs or just go with real objects?
(Just making myself clear I'll keep the mock object of the sensitive stuff like database and services that are out of my context, in both situations.)
© Programmers or respective owner