package Ġcom . github . k ac so . android commons . extensions Ċ Ċ import Ġandroid . widget . CheckBox Ċ import Ġandroidx . arch . core . executor . testing . Instant Task Executor Rule Ċ import Ġandroidx . lifecycle . Lifecycle Owner Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġcom . github . k ac so . android commons . test . lifecycle . Test Lifecycle Owner Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . jupiter . api . Assertions Ċ import Ġorg . junit . rules . Test Rule Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . ro bo lectric . Ro bo lectric TestRunner Ċ import Ġorg . ro bo lectric . Runtime Environment Ċ import Ġorg . ro bo lectric . annotation . Config Ċ Ċ @ RunWith ( Ro bo lectric TestRunner :: class ) Ċ @ Config ( sdk Ġ= Ġ[ 2 3 ]) Ċ class ĠCheckbox Extensions Test Ġ{ ĊĠĠĠ Ġ@ get : Rule ĊĠĠĠ Ġvar Ġrule : ĠTest Rule Ġ= ĠInstant Task Executor Rule () ĊĊĠĠĠ Ġprivate Ġval Ġlifecycle Owner : ĠLifecycle Owner Ġ= ĠTest Lifecycle Owner () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġset Live Checked () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġld Ġ= ĠMutable LiveData < Boolean >() ĊĠĠĠĠĠĠĠ Ġld . value Ġ= Ġtrue ĊĊĠĠĠĠĠĠĠ Ġval Ġcheckbox Ġ= ĠCheckBox ( Runtime Environment . system Context ) ĊĊĠĠĠĠĠĠĠ Ġcheckbox . set Live Checked ( lifecycle Owner , Ġld ) ĊĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( checkbox . isChecked ) ĊĠĠĠĠĠĠĠ Ġld . value Ġ= Ġfalse ĊĠĠĠĠĠĠĠ ĠAssertions . assertFalse ( checkbox . isChecked ) ĊĠĠĠ Ġ} Ċ }