Last active
March 4, 2019 13:26
-
-
Save atomgomba/199165896ef9cbfac6577d73e0569a82 to your computer and use it in GitHub Desktop.
Kotlin coroutine dispatcher for unit testing
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
import kotlinx.coroutines.CoroutineDispatcher | |
import kotlinx.coroutines.Runnable | |
import kotlin.coroutines.CoroutineContext | |
/** | |
* @author Károly Kiripolszky <[email protected]> | |
*/ | |
class TestCoroutineDispatcher : CoroutineDispatcher() { | |
override fun dispatch(context: CoroutineContext, block: Runnable) { | |
block.run() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment