package Ġru . m rf iring . shift weather app . domain Ċ Ċ import Ġio . mock k .* Ċ 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 City Ċ Ċ @ Experimental Cor outines Api Ċ @ Obsolete Cor outines Api Ċ class ĠUpdate City UseCase Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġcities Repository : ĠC ities Repository Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġupdate City UseCase Ġ= ĠUpdate City UseCase ( cities Repository ) ĊĠĠĠ Ġprivate Ġval Ġcity : ĠDomain City Ġ= Ġmock k () ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġval Ġcoroutine Rule Ġ= ĠCor outine Test Rule () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` update Ġcity ĠEXPECT ED Ġto Ġcall Ġrepository Ġupdate Ġcity `() Ġ= Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠ Ġco Every Ġ{ Ġcities Repository . update City ( city ) Ġ} Ġjust Ġruns ĊĊĠĠĠĠĠĠĠ Ġupdate City UseCase ( city ) ĊĊĠĠĠĠĠĠĠ Ġco Verify Ġ{ Ġcities Repository . update City ( city ) Ġ} ĊĠĠĠ Ġ} ĊĊ Ċ }