Interactions

Learn about the test double by analyzing various code segments that perform such tests.

We'll cover the following

Now, what about those side effects? It’s a huge pain to augment our code with constructs like “If in test mode, don’t actually connect to the database." Instead, most languages have a mechanism for creating test doubles that take the place of the resource our function wants to use.

Get hands-on with 1200+ tech skills courses.