|
|
|
|
|
by henrikeh
2313 days ago
|
|
Just a question. Do you imply that the mock of a device should simulate/emulate the entire behavior of the device? Because you definitely don't need to do that and it would, of course, be a vast and hard-to-justify endeavor. You only need to _mock_ the object, that is emulate behavior on a small scale. |
|
It depends on what we are testing.
It can actually be worse than useless to rely on the "perfect world" of unit testing. I have had a nasty shock, when switching from mocked behavior to real-world behavior. I write about that here: https://medium.com/chrismarshallny/concrete-galoshes-a5798a5...