Last active
August 27, 2015 06:57
-
-
Save patrykpoborca/8b31992db952f258be23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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