package Ġru . m rf iring . shift weather app . domain Ċ Ċ import Ġio . mock k . co Every Ċ import Ġio . mock k . mock k Ċ import Ġio . mock k . slot Ċ import Ġjunit . framework . Assert . assertEquals Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . Obsolete 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 Ċ import Ġru . m rf iring . shift weather app . domain . models . Domain Weather Container Ċ Ċ @ Experimental Cor outines Api Ċ @ Obsolete Cor outines Api Ċ class ĠGet Weather UseCase Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġweather Repository : ĠWeather Repository Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġdomain Weather Container : ĠDomain Weather Container Ġ= Ġmock k () ĊĊĠĠĠ Ġprivate Ġval Ġget Weather UseCase Ġ= ĠGet Weather UseCase ( weather Repository ) ĊĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġval Ġcoroutine Rule Ġ= ĠCor outine Test Rule () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` get Ġweather ĠEXPECT ED Ġto Ġreturn Ġweather Ġcontainer `() Ġ= Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġweather Repository . get Weather ( capture ( slot ())) Ġ} Ġreturns Ġdomain Weather Container ĊĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġget Weather UseCase ( 0 ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( domain Weather Container , Ġresult ) ĊĠĠĠ Ġ} ĊĊ Ċ }