August 2017
Intermediate to advanced
468 pages
12h 5m
English
In the preceding case, the function is the smallest testable unit. However, in many cases, even the simplest functions will rely on a functionality defined in another class, or supplied by external APIs. The more complex the function gets, the more external components it relies on, the more likely it is that a full function test will be an Integration test rather than a Unit test.
Even if we do not choose to encapsulate the calls to external APIs in a separate unit, the dependencies themselves dictate the fact that we are moving further towards Integration tests. This fact can be seen clearly when we write tests, as we will notice a long list of things that need to be mocked, or relied upon. You will see an example of ...