I’m frequently asked about the difference between automated testing terms like fakes, stubs and mocks.
The term fake is a general term for an object that stands in for another object; both stubs and mocks are types of fakes. The purpose of a fake is to create an object that allows the method-under-test to be tested in isolation from its dependencies, meeting one of two objectives:
1. Stub — Prevent the dependency from obstructing the method-under-test and to respond in a way that helps it ...
Published on October 23, 2020 08:27