package Ġcom . d anie le fav aro . spac ex . base Ċ Ċ import Ġandroidx . arch . core . executor . testing . Instant Task Executor Rule Ċ import Ġcom . d anie le fav aro . spac ex . main . di . D agger Main Component Test Ċ import Ġcom . d anie le fav aro . spac ex . main . di . Main Component Test Ċ import Ġcom . d anie le fav aro . spac ex . main . domain . La unches Repository Ċ import Ġcom . d anie le fav aro . spac ex . main . ui . view model . Main ViewModel Ċ import Ġio . mock k . spy k Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . cancel Ċ import Ġokhttp 3 . mock webserver . Mock WebServer Ċ import Ġorg . junit . After Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . rules . Test Rule Ċ import Ġjavax . inject . Inject Ċ Ċ @ Experimental Cor outines Api Ċ open Ġclass ĠBase UnitTest Ġ{ ĊĊĠĠĠ Ġval Ġcomponent : ĠMain Component Test Ġ= ĠD agger Main Component Test . create () ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġrule : ĠTest Rule Ġ= ĠInstant Task Executor Rule () ĊĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġcoroutine Rule Ġ= ĠTest Coroutine Rule () ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġla unches Repository : ĠLa unches Repository ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġmock WebServer : ĠMock WebServer ĊĊĠĠĠ Ġlateinit Ġvar Ġmain ViewModel : ĠMain ViewModel ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġopen Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġcomponent . inject ( this ) ĊĊĠĠĠĠĠĠĠ Ġmock Stuff () ĊĊĠĠĠĠĠĠĠ Ġmain ViewModel Ġ= ĠMain ViewModel ( la unches Repository ) ĊĠĠĠĠĠĠĠ Ġmain ViewModel Ġ= Ġspy k ( main ViewModel ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ After ĊĠĠĠ Ġopen Ġfun ĠtearDown () Ġ{ ĊĠĠĠĠĠĠĠ Ġmock WebServer . shutdown () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġmock Stuff () Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠTODO ĊĠĠĠ Ġ} Ċ }