You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RestAdapter adapter = new RestAdapter.Builder()
.baseUrl(RESTMockServer.getUrl())
.build();
You mentioned that we need to change base url in native code by using TestApplicatiion. Why you need to this. The interceptor needs to works irespective to URL. sometime application has multiple URL and some developer dont want to change the code. It will be helpful that you provide the explaination. I read the tutorial mentioned in above step. I need to integrate this library for Espresso Tests
The text was updated successfully, but these errors were encountered:
hey @shahidlatif2007 . this is because the library starts a test HTTP server. if you don't replace the base URL in your app, the app will target your servers and the mock library's HTTP server will not be responding with mock responses.
Why not MockWebServer uses this step as under the hood you are using that library. One of developer ask me this question. Why this library uses this step and why not MockWebServer library required this step.
actually MockWebServer asks you exactly for the same thing. It first starts the server, saves the mock server's URL to a variable that is then passed to the app's code to use instead of real base URL:
RestAdapter adapter = new RestAdapter.Builder()
.baseUrl(RESTMockServer.getUrl())
.build();
You mentioned that we need to change base url in native code by using TestApplicatiion. Why you need to this. The interceptor needs to works irespective to URL. sometime application has multiple URL and some developer dont want to change the code. It will be helpful that you provide the explaination. I read the tutorial mentioned in above step. I need to integrate this library for Espresso Tests
The text was updated successfully, but these errors were encountered: