3 ms·
What does mocking an interface mean, like a mock implementation? How is that different then defining an API and then having stub methods on the front returning
by djohnston 6y ago
What does mocking an interface mean, like a mock implementation?
How is that different then defining an API and then having stub methods on the front returning pretend data?
- gitgud 6y agoI think they mean wrapping the REST api in a class (aka "data provider" or "repository pattern") this way you've abstracted the HTTP request logic away from your application. Both the API and the Mock implementation will require the same interface.