package Ġcom . yar os lav l ance lot . eaf all . test . game . popup Ċ Ċ import Ġcom . yar os lav l ance lot . eaf all . game . constant . Size Constants Ċ import Ġcom . yar os lav l ance lot . eaf all . game . popup . IP op up Ċ import Ġcom . yar os lav l ance lot . eaf all . game . popup . Popup Scene Ċ import Ġcom . yar os lav l ance lot . eaf all . game . scene . scenes . Ea Fall Scene Ċ import Ġcom . yar os lav l ance lot . eaf all . test . game . Ea Fall TestCase Ċ import Ġorg . and engine . engine . camera . Velocity Camera Ċ Ċ /** Ċ Ġ* ĠCheck Ġbasic Ġpopup Ġscene Ġfunctionality Ċ Ġ* Ċ Ġ* Ġ@ author ĠY ar os lav ĠH av ry lo vy ch Ċ Ġ*/ Ċ class ĠPopup Scene Test Ġ: ĠE a Fall TestCase () Ġ{ ĊĠĠĠ Ġval Ġm Scene Ġ= ĠE a Fall Scene ( false ) ĊĠĠĠ Ġval Ġm Camera Ġ= ĠVe locity Camera ( 0 f , Ġ 0 f , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSize Constants . GAME _ FIELD _ WIDTH . toFloat (), ĠSize Constants . GAME _ FIELD _ HEIGHT . toFloat (), ĊĠĠĠĠĠĠĠĠĠĠĠĠ 1 f , Ġ 1 f , Ġ 1 . 5 f ) ĊĊĠĠĠ Ġfun Ġtest Visibility () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpopup Scene Ġ= ĠPopup Scene ( m Scene , Ġm Camera ) ĊĠĠĠĠĠĠĠ ĠassertFalse ( popup Scene . is Showing , Ġ" popup Ġscene Ġhas Ġto Ġbe Ġinvisible Ġnow ") ĊĠĠĠĠĠĠĠ Ġpopup Scene . show Popup () ĊĠĠĠĠĠĠĠ ĠassertTrue ( popup Scene . is Showing , Ġ" popup Ġhas Ġto Ġbe Ġvisible ") ĊĠĠĠĠĠĠĠ Ġpopup Scene . show Popup () ĊĠĠĠĠĠĠĠ ĠassertTrue ( popup Scene . is Showing , Ġ" popup Ġhas Ġto Ġbe Ġvisible ") ĊĠĠĠĠĠĠĠ Ġpopup Scene . hide Popup () ĊĠĠĠĠĠĠĠ ĠassertFalse ( popup Scene . is Showing , Ġ" popup Ġhas Ġto Ġbe Ġinvisible ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġtest State Changes () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpopup Scene Ġ= ĠPopup Scene ( m Scene , Ġm Camera ) ĊĠĠĠĠĠĠĠ ĠassertFalse ( popup Scene . is Showing , Ġ" popup Ġscene Ġhas Ġto Ġbe Ġinvisible Ġnow ") ĊĠĠĠĠĠĠĠ Ġval Ġstate Listener Ġ= Ġobject Ġ: ĠIP op up . State Changing Listener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġvar Ġwas Trigger Ġ= Ġfalse ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġon Show ed () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġwas Trigger Ġ= Ġtrue ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġon H ided () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġwas Trigger Ġ= Ġfalse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ ĠassertFalse ( state Listener . was Trigger , Ġ" shown Ġstate Ġhas Ġto Ġbe Ġfalse Ġat Ġthe Ġbeginning ") ĊĠĠĠĠĠĠĠ Ġpopup Scene . setState ChangeListener ( state Listener ) ĊĠĠĠĠĠĠĠ Ġpopup Scene . show Popup () ĊĠĠĠĠĠĠĠ ĠassertTrue ( state Listener . was Trigger , Ġ" state Ġchange Ġlistener Ġhasn 't Ġbeen Ġtriggered Ġafter Ġthe Ġpopup Ġwas Ġshowed ") ĊĠĠĠĠĠĠĠ Ġpopup Scene . hide Popup () ĊĠĠĠĠĠĠĠ ĠassertFalse ( state Listener . was Trigger , Ġ" state Ġchange Ġlistener Ġhasn 't Ġbeen Ġtriggered Ġafter Ġthe Ġpopup Ġwas Ġhidden ") ĊĠĠĠ Ġ} Ċ } Ċ