Skip to content

Instantly share code, notes, and snippets.

@wingyplus
Last active September 30, 2016 04:17
Show Gist options
  • Save wingyplus/228daf58228cb83176dc1be7f5b1b712 to your computer and use it in GitHub Desktop.
Save wingyplus/228daf58228cb83176dc1be7f5b1b712 to your computer and use it in GitHub Desktop.
package io.github.wingyplus.retrofittut;
import org.junit.Before;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class RetrofitTest {
UserService userService;
@Before
public void setUp() {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("http://localhost:8080/")
.addConverterFactory(GsonConverterFactory.create())
.build();
userService = retrofit.create(UserService.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment