Created
July 28, 2020 11:27
-
-
Save arkivanov/beb120458b3a5ac5f0332f1c7bb9c0bc to your computer and use it in GitHub Desktop.
TestKittenStoreParser
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
| class TestKittenStoreParser : KittenStoreImpl.Parser { | |
| override fun parse(json: String): Maybe<List<String>> = | |
| json | |
| .toSingle() | |
| .filter { it != "" } | |
| .map { it.split(SEPARATOR) } | |
| .observeOn(TestScheduler()) | |
| private companion object { | |
| private const val SEPARATOR = ";" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment