July 2024
Intermediate to advanced
360 pages
9h 45m
English
This chapter covers
WebApplicationFactory for API testingUnit testing tests individual units in isolation. Dependencies between units are abstracted, usually by interface. The interfaces create a contract to which both the dependent and the dependency adhere, but code rarely has no side effects. Even in previous chapters, we’ve seen side effects from using streams. A stream’s position and whether it’s open, closed, or disposed can be changed by any code that touches it. Changes to a database while your code is running may cause an insert to fail or an update to be overwritten. Unit testing isn’t enough. We also need to test how units work ...
Read now
Unlock full access