package Ġcom . el pass ion . main fr amer plugin . action . configure . selector Ċ Ċ import Ġcom . el pass ion . android . commons . rx jav atest . then Just Ċ import Ġcom . intellij . execution . configurations . Run Configuration Ċ import Ġcom . intellij . test Framework . fixtures . Light Platform Code Insight Fixture TestCase Ċ import Ġcom . n ha ar man . mockito _ kotlin . any Ċ import Ġcom . n ha ar man . mockito _ kotlin . mock Ċ import Ġcom . n ha ar man . mockito _ kotlin . wh enever Ċ Ċ class ĠUi Selector Test Ġ: ĠLight Platform Code Insight Fixture TestCase () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġui Selector Ġ= Ġmock < Ui Selector >() ĊĊĠĠĠ Ġfun Ġtest Should Return Empty Items List When No Configuration In Project () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= ĠSelector Result ( emptyList (), Ġempty List ()) ĊĠĠĠĠĠĠĠ Ġwhenever ( ui Selector . invoke ( any (), Ġany ())). then Just ( result ) ĊĠĠĠĠĠĠĠ Ġselector ( project , Ġui Selector ). invoke (). test (). assert Value Ġ{ Ġit Ġ== Ġresult Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġtest Should Return Selected Configuration OnChange In Ui () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġconfiguration Ġ= Ġmock < Run Configuration >() ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= ĠSelector Result ( listOf ( configuration ), Ġempty List ()) ĊĠĠĠĠĠĠĠ Ġwhenever ( ui Selector . invoke ( any (), Ġany ())). then Just ( result ) ĊĠĠĠĠĠĠĠ Ġselector ( project , Ġui Selector ). invoke (). test (). assert Value Ġ{ Ġit Ġ== Ġresult Ġ} ĊĠĠĠ Ġ} Ċ }