3 ms·
IIRC the "unit" in "unit test" was meant to mean "semantic unit" ("the access module", for example, should be distinct with a well-defined interface that all th
by Izkata 4y ago
IIRC the "unit" in "unit test" was meant to mean "semantic unit" ("the access module", for example, should be distinct with a well-defined interface that all the tests go through), but very quickly turned into "syntactic units" ("a single function", for example, where the "well-defined interface" ends up just being function arguments/return value) because most people didn't understand what the original proponents meant.
- branko_d 4y agoI have a Web API which calls a DB API which calls a stored procedure which executes several SQL statements. The Web API has a well-defined and documented interface. Is it a “unit”?
- Izkata 4y agoIn the semantic sense? No, or at least probably not if that's where you jump to. You're still thinking in terms of syntax. Think in terms of business rules, not the code structure: What's one thing your API does?