Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void loginUserAccount() {
- NetworkHelper.MOCK_URL =
- String userName = "abacus@hotmail.com";
- String password = "abacus#112";
- boolean keepMeLoggedInChecked = false;
- boolean touchIdEnabled = false;
- boolean optIn = false;
- mAuthenticationService.logIn(userName, password, keepMeLoggedInChecked, touchIdEnabled, optIn).done(new DoneCallback<LogInResponse>() {
- @Override
- public void onDone(final LogInResponse result) {
- Assert.assertEquals(true,true);
- }
- }).fail(new FailCallback<Throwable>() {
- @Override
- public void onFail(Throwable result) {
- Assert.assertEquals(true,false);
- }
- });
- }
- public class NetworkHelper {
- private final OkHttpClient mOkHttpClient;
- public static HttpUrl MOCK_URL = null;
- public NetworkHelper(OkHttpClient httpClient) {
- mOkHttpClient = httpClient;
- }
- public Retrofit initialize(String baseUrl) {
- if(MOCK_URL!=null) {
- Retrofit retrofit = new Retrofit.Builder()
- .baseUrl(MOCK_URL)
- .addConverterFactory(JacksonConverterFactory.create())
- .client(mOkHttpClient)
- .build();
- return retrofit;
Add Comment
Please, Sign In to add comment