← Back to context

Comment by sethammons

12 days ago

This is a solid article. So many mocks that, at the end, verify you set up your mock amd that 1=1.

One paragraph I think is missing: error handling. You want units to be able to error so you can validate error handling which is _very_ hard on E2E tests. You can simulate disk full or db errors and make sure things fall back or log as expected. This can be done with fakes. Mocks are a specific type of test double that I have very little use of.