package Ġcom . d anie le fav aro . spac ex . base Ċ Ċ import Ġkotlinx . coroutines . Dispatch ers Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . test .* Ċ import Ġorg . junit . rules . Test Watcher Ċ import Ġorg . junit . runner . Description Ċ Ċ @ Experimental Cor outines Api Ċ class ĠTest Coroutine Rule Ġconstructor ( ĊĠĠĠ Ġval Ġtest Dispatcher : ĠTest Coroutine Dispatcher Ġ= ĠTest Coroutine Dispatcher () Ċ ) Ġ: ĠTest Watcher () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġstarting ( description : ĠDescription ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . starting ( description ) ĊĠĠĠĠĠĠĠ ĠDispatch ers . set Main ( test Dispatcher ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġfinished ( description : ĠDescription ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . finished ( description ) ĊĠĠĠĠĠĠĠ ĠDispatch ers . reset Main () ĊĠĠĠĠĠĠĠ Ġtest Dispatcher . cleanup Test Cor outines () ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Experimental Cor outines Api Ċ fun ĠTest Coroutine Rule . run Blocking Test ( block : Ġsuspend ĠTest Coroutine Scope . () Ġ-> ĠUnit ) Ġ= ĊĠĠĠ Ġtest Dispatcher . run Blocking Test ( block ) Ċ Ċ @ Experimental Cor outines Api Ċ suspend Ġfun ĠTest Coroutine Rule . pause Dispatcher ( block : Ġsuspend Ġ() Ġ-> ĠUnit ) Ġ= ĊĠĠĠ Ġtest Dispatcher . pause Dispatcher ( block ) Ċ Ċ @ Experimental Cor outines Api Ċ fun ĠTest Coroutine Rule . run Current () Ġ= ĊĠĠĠ Ġtest Dispatcher . run Current () Ċ Ċ @ Experimental Cor outines Api Ċ fun ĠTest Coroutine Rule . resume Dispatcher () Ġ= ĊĠĠĠ Ġtest Dispatcher . resume Dispatcher ()