DEV Community

Discussion on: Do you use isolated tests?

Collapse
 
delbetu profile image
M Bellucci

Seems like you are mocking an external system which is out of your system.

Mocking the external world it is mandatory because you cannot create database values in order to provide data for your test.

If you create two internal classes who call each other then do you test them separated?

Collapse
 
jessekphillips profile image
Jesse Phillips

"Seems like you are mocking an external system which is out of your system."

It seems to me that is what his design arrangement is. You should build a system that interacts with a different system through a contract.

I'm not a web developer so I'm not familiar with making classes with divs and css to define these contracts between them. I can say that with my own coding I aim for a more functional style of programming, but do not have a emphasis on TDD and leave gaping holes in coverage.