Skip to content

Instantly share code, notes, and snippets.

@patrykpoborca
Created August 27, 2015 06:59
Show Gist options
  • Save patrykpoborca/27f02caaa6efec73cc04 to your computer and use it in GitHub Desktop.
Save patrykpoborca/27f02caaa6efec73cc04 to your computer and use it in GitHub Desktop.
public class MockTweeterApi extends TweeterApi{
public MockTweeterApi(Retrofit retrofit, LocalDataCache dataCache, Scheduler mainScheduler) {
super(retrofit, dataCache, mainScheduler);
}
@Override
public Observable<UserProfile> login(String username, String password) {
return Observable.just(new UserProfile(username, password))
.observeOn(mainScheduler);
}
@Override
public Observable<Object> logout() {
return Observable.just(null)
.observeOn(mainScheduler);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment