4 ms·
No mention of mocking out service dependencies, which seems like the obvious way to go. Does anyone do this?
by akud 9y ago
No mention of mocking out service dependencies, which seems like the obvious way to go. Does anyone do this?
- Clubber 9y agoAbsolutely. We have several front end layers, then nested service layers and then nested repo layers, all get mocked depending on the level of object we are testing. We then have separate integration tests that test the repo against an actual database. We design the integration tests so they are largely data independent (we load the data we test rather than just mock data).