|
|
|
|
|
by cyberneticcook
4433 days ago
|
|
> otherwise what exactly are you testing? it depends, what do you want to test ? If you are testing a single function, why would you care whether the data comes from the database, the network or from a mock ? All you need is to verify that the given function produces the expected output given the right (and wrong) inputs. Being able to test this way also makes easy to keep the components in your software decoupled. My philosophy is to use mocks for unit tests and the real thing for integration tests. |
|