Skip to content

Instantly share code, notes, and snippets.

@Teino1978-Corp
Forked from patrykpoborca/MockTweeterApi.java
Last active August 27, 2015 07:09
Show Gist options
  • Save Teino1978-Corp/aa3ac2cc40314a50b85a to your computer and use it in GitHub Desktop.
Save Teino1978-Corp/aa3ac2cc40314a50b85a 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