Created
October 17, 2017 20:04
-
-
Save kozmi55/743b71b0517f738494ebf0aa3b5b4a45 to your computer and use it in GitHub Desktop.
This file contains 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
class FakeUserRepository : UserRepository { | |
override fun getUsers(page: Int, forced: Boolean): Single<UserListModel> { | |
val users = (1..10L).map { | |
val number = (page - 1) * 10 + it | |
User(it, "User $number", number * 100, "") | |
} | |
return Single.create<UserListModel> { emitter: SingleEmitter<UserListModel> -> | |
val userListModel = UserListModel(users) | |
emitter.onSuccess(userListModel) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment