Moving from mock to real objects?
- by jjchiw
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.)