Last active
July 31, 2018 10:46
-
-
Save JorgeCastilloPrz/ccc5174c0f9f644989af647a037fa5eb to your computer and use it in GitHub Desktop.
RuntimeSingleTest.kt
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
| object test { | |
| @JvmStatic | |
| fun main(args: Array<String>): Unit { | |
| val user1 = User(UserId("user1")) | |
| val user2 = User(UserId("user2")) | |
| val user3 = User(UserId("unknown user")) | |
| val singleModule = Module(SingleK.async()) | |
| singleModule.run { | |
| repository.allTasksByUser(user1).fix().single.subscribe({ println(it) }, { println(it) }) | |
| repository.allTasksByUser(user2).fix().single.subscribe({ println(it) }, { println(it) }) | |
| repository.allTasksByUser(user3).fix().single.subscribe({ println(it) }, { println(it) }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment