Skip to content

Instantly share code, notes, and snippets.

@patrykpoborca
Last active August 27, 2015 06:57
Show Gist options
  • Save patrykpoborca/8b31992db952f258be23 to your computer and use it in GitHub Desktop.
Save patrykpoborca/8b31992db952f258be23 to your computer and use it in GitHub Desktop.
public class MockLocalDataCache extends LocalDataCache {
public MockLocalDataCache(Context context) {
super(context);
}
@Override
public void saveTweet(String tweet) {
sPastTweets.add(tweet);
}
@Override
public Observable<List<String>> fetchRecentTweets() {
return Observable.just(sPastTweets)
.map(arrayList -> {
List<String> list = arrayList;
return list;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment