package Ġcom . mapbox . navigation . ui . pu ck Ċ Ċ import Ġcom . mapbox . lib navigation . ui . R Ċ import Ġcom . mapbox . mapbox sdk . camera . Camera Position Ċ import Ġcom . mapbox . mapbox sdk . location . Location Component Ċ import Ġcom . mapbox . mapbox sdk . location . Location Component Options Ċ import Ġcom . mapbox . mapbox sdk . maps . Map box Map Ċ import Ġcom . mapbox . navigation . base . trip . model . Route Progress Ċ import Ġcom . mapbox . navigation . base . trip . model . Route Progress State Ċ import Ġcom . mapbox . navigation . core . Map box Navigation Ċ import Ġcom . mapbox . navigation . core . trip . session . Route Progress Observer Ċ import Ġio . mock k . every Ċ import Ġio . mock k . mock k Ċ import Ġio . mock k . slot Ċ import Ġio . mock k . verify Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Test Ċ Ċ class ĠNavigation P uck Presenter Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġp uck Drawable Updates On Route Progress () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmap box Map Ġ= Ġmock k < Map box Map >( relax Unit Fun Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġmap box Navigation Ġ= Ġmock k < ĠMap box Navigation >( relax Unit Fun Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġp uck Drawable Supplier Ġ= ĠDefault Map box P uck Drawable Supplier () ĊĠĠĠĠĠĠĠ Ġval Ġpresenter Ġ= ĠNavigation P uck Presenter ( mapbox Map , Ġp uck Drawable Supplier ) ĊĠĠĠĠĠĠĠ Ġval Ġroute Progress Observer Slot Ġ= Ġslot < Route Progress Observer >() ĊĠĠĠĠĠĠĠ Ġval Ġroute Progress Ġ= Ġmock k < Route Progress >() ĊĠĠĠĠĠĠĠ Ġval Ġlocation Component Options Ġ= Ġmock k < Location Component Options >( relax Unit Fun Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġlocation Component Ġ= Ġmock k < Location Component >( relax Unit Fun Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= Ġmock k < Location Component Options . Builder >() ĊĠĠĠĠĠĠĠ Ġval Ġdrawable Slot Ġ= Ġslot < Int >() ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġmap box Map . location Component Ġ} Ġreturns Ġlocation Component ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġlocation Component . location Component Options Ġ} Ġreturns Ġlocation Component Options ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġroute Progress . currentState () Ġ} Ġreturns ĠRoute Progress State . LOCATION _ TRACK ING ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġlocation Component Options . gps Drawable () Ġ} Ġreturns Ġ 0 ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġlocation Component Options . to Builder () Ġ} Ġreturns Ġbuilder ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġbuilder . gps Drawable ( capture ( drawable Slot )) Ġ} Ġreturns Ġbuilder ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġbuilder . build () Ġ} Ġreturns Ġlocation Component Options ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġmap box Map . camera Position Ġ} Ġreturns ĠCamera Position . DEFAULT ĊĠĠĠĠĠĠĠ Ġpresenter . add Progress ChangeListener ( mapbox Navigation ) ĊĠĠĠĠĠĠĠ Ġverify Ġ{ Ġmap box Navigation . register Route Progress Observer ( capture ( route Progress Observer Slot )) Ġ} ĊĊĠĠĠĠĠĠĠ Ġroute Progress Observer Slot . captured . on Route Progress Changed ( route Progress ) ĊĊĠĠĠĠĠĠĠ Ġverify Ġ{ Ġlocation Component . apply Style ( location Component Options ) Ġ} ĊĠĠĠĠĠĠĠ ĠassertEquals ( R . drawable . user _ pu ck _ icon , Ġdrawable Slot . captured ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġon Stop () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmap box Map Ġ= Ġmock k < Map box Map >( relax Unit Fun Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġmap box Navigation Ġ= Ġmock k < ĠMap box Navigation >( relax Unit Fun Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġp uck Drawable Supplier Ġ= ĠDefault Map box P uck Drawable Supplier () ĊĠĠĠĠĠĠĠ Ġval Ġpresenter Ġ= ĠNavigation P uck Presenter ( mapbox Map , Ġp uck Drawable Supplier ) ĊĠĠĠĠĠĠĠ Ġpresenter . add Progress ChangeListener ( mapbox Navigation ) ĊĊĠĠĠĠĠĠĠ Ġpresenter . on Stop () ĊĊĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 1 ) Ġ{ Ġmap box Navigation . unregister Route Progress Observer ( any ()) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun ĠonStart () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmap box Map Ġ= Ġmock k < Map box Map >( relax Unit Fun Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġmap box Navigation Ġ= Ġmock k < ĠMap box Navigation >( relax Unit Fun Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġp uck Drawable Supplier Ġ= ĠDefault Map box P uck Drawable Supplier () ĊĠĠĠĠĠĠĠ Ġval Ġpresenter Ġ= ĠNavigation P uck Presenter ( mapbox Map , Ġp uck Drawable Supplier ) ĊĠĠĠĠĠĠĠ Ġpresenter . add Progress ChangeListener ( mapbox Navigation ) ĊĠĠĠĠĠĠĠ Ġpresenter . on Stop () ĊĊĠĠĠĠĠĠĠ Ġpresenter . onStart () ĊĊĠĠĠĠĠĠĠ Ġverify ( exact ly Ġ= Ġ 2 ) Ġ{ Ġmap box Navigation . register Route Progress Observer ( any ()) Ġ} ĊĠĠĠ Ġ} Ċ } Ċ