package Ġru . m rf iring . shift weather app . domain Ċ Ċ import Ġio . mock k .* Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . test . run Blocking Test Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġru . m rf iring . shift weather app . Coroutine Test Rule Ċ Ċ @ Experimental Cor outines Api Ċ class ĠUpdate Weather UseCase Test Ġ{ ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġval Ġcoroutine Rule Ġ= ĠCor outine Test Rule () ĊĊĠĠĠ Ġprivate Ġval Ġweather Repository : ĠWeather Repository Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġupdate Weather UseCase Ġ= ĠUpdate Weather UseCase ( weather Repository ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` update Ġweather ĠEXPECT ED Ġto Ġcall Ġweather Ġrepository Ġupdate Ġweather `() Ġ= Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġweather Repository . update Weather From Server ( 0 ) Ġ} Ġjust Ġruns ĊĊĠĠĠĠĠĠĠ Ġupdate Weather UseCase ( 0 ) ĊĊĠĠĠĠĠĠĠ Ġco Verify Ġ{ Ġweather Repository . update Weather From Server ( 0 ) Ġ} ĊĠĠĠ Ġ} Ċ Ċ }