3 ms·
> Does it make sense to unit test a method that sends a request to a REST API to get geographical coordinates? Most likely, not. Isn't a "unit test" which send
by danans 6y ago
> Does it make sense to unit test a method that sends a request to a REST API to get geographical coordinates? Most likely, not.
Isn't a "unit test" which sends a request to a REST API almost by definition an "integration test", or even a "live server smoke/staging test", since it is testing the integration between separate live systems (the requesting code and the server).
If anything, what should the unit tested if anything is the code that generates the request, which should be separate from the code that sends the request to the server. But only if that code is non-trivial.