3 ms·
You can’t test the logic without the parts that interpret the logic. Your mock will fail if I change the name of a alias in my query. A database won’t. Don’t c
by slver 5y ago
You can’t test the logic without the parts that interpret the logic. Your mock will fail if I change the name of a alias in my query. A database won’t.
Don’t confuse how it’s done with what is done.
- hinkley 5y agoDon’t confuse functional tests with unit tests. Both are necessary for systems with side effects (ie most systems)
- slver 5y agoI hope you realize there's a fuzzy line between those, when you have ideal test doubles, that behave like the real thing, but are just configurable in-memory replicas of the dependency. People get suck a kick out of categorizing their tests, I honestly find that funny. Can you run it easily before you commit code to a unit, without a dedicated setup? Yes, then it's a unit test to me. If it was me I wouldn't call it "something" test at all. It's just automated tests. The rest is mostly BS.