4 ms·
Tests always rely on implementation details. The implementation details are what you're testing, after all. The problem is relying on the wrong ones. You can
by NateDad 10y ago
Tests always rely on implementation details. The implementation details are what you're testing, after all. The problem is relying on the wrong ones.
You can hide all the details you want in the language, unless it's a pure function, there's side effects that can be relied on improperly. Often times this is because of hiding implementation details. A GenerateCert function might read from a config file. It hides the detail that the config file exists, but then to test it you need to create the file in the right spot.
Yes, testing Add(int, int) is easy in any language. No one's struggling with those tests.