3 ms·
That way leads to madness, and I don't follow that style/philosophy of mocking components. Only mock the things you can't easily set up in your unit tests to g
by rhdunn 5y ago
That way leads to madness, and I don't follow that style/philosophy of mocking components.
Only mock the things you can't easily set up in your unit tests to get them to work, like database connections. For spring-based components, try to use the real components where possible, but where needed use mock components that do enough to get the system working.
That does mean that if you are testing function A you are also indirectly testing function B, but that is fine.