package Ġcom . ew ings a . o hy eah . info Ċ Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . any Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . mock Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . never Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . times Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . verify Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ Ċ class ĠInfo Presenter Test Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġview : ĠInfo Contract . View Ġ= Ġmock () ĊĠĠĠ Ġprivate Ġvar Ġinter actor : ĠInfo Contract . Interactor Ġ= Ġmock () ĊĠĠĠ Ġprivate Ġvar Ġrouter : ĠInfo Contract . Router Ġ= Ġmock () ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġinfo Presenter : ĠInfo Presenter ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ Ġinfo Presenter Ġ= ĠInfo Presenter ( inter actor ). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġon View Attached ( view , Ġrouter ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest On View Attached () Ġ{ ĊĠĠĠĠĠĠĠ Ġinfo Presenter . on View Attached ( view , Ġrouter ) ĊĊĠĠĠĠĠĠĠ Ġverify ( inter actor , Ġtimes ( 2 )). on Router Attached ( router ) ĊĠĠĠĠĠĠĠ Ġverify ( view , Ġtimes ( 2 )). set ViewModel ( any ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest On Back Press () Ġ{ ĊĠĠĠĠĠĠĠ Ġinfo Presenter . on Back Press () ĊĊĠĠĠĠĠĠĠ Ġverify ( inter actor ). go Back () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest On Open Source License s Press () Ġ{ ĊĠĠĠĠĠĠĠ Ġinfo Presenter . on Open Source License s Press () ĊĊĠĠĠĠĠĠĠ Ġverify ( view ). show Open Source License s () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest On View Detached () Ġ{ ĊĠĠĠĠĠĠĠ Ġinfo Presenter . on View Detached () ĊĊĠĠĠĠĠĠĠ Ġinfo Presenter . on Open Source License s Press () ĊĊĠĠĠĠĠĠĠ Ġverify ( view , Ġnever ()). show Open Source License s () ĊĠĠĠ Ġ} Ċ } Ċ