package Ġorg . opp ia . android . testing . story Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroid . content . Context Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġandroidx . test . core . app . Application Provider Ċ import Ġandroidx . test . ext . junit . runners . Android JUnit 4 Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġdagger . Bind s Instance Ċ import Ġdagger . Component Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . mockito . Argument Captor Ċ import Ġorg . mockito . Captor Ċ import Ġorg . mockito . Mock Ċ import Ġorg . mockito . Mockito . at Least Once Ċ import Ġorg . mockito . Mockito . reset Ċ import Ġorg . mockito . Mockito . verify Ċ import Ġorg . mockito . junit . Mockito JUnit Ċ import Ġorg . mockito . junit . Mockito Rule Ċ import Ġorg . opp ia . android . app . model . Chapter Play State Ċ import Ġorg . opp ia . android . app . model . Chapter Progress Ċ import Ġorg . opp ia . android . app . model . Chapter Summary Ċ import Ġorg . opp ia . android . app . model . Profile Id Ċ import Ġorg . opp ia . android . app . model . Story Progress Ċ import Ġorg . opp ia . android . app . model . Story Summary Ċ import Ġorg . opp ia . android . app . model . Topic Ċ import Ġorg . opp ia . android . app . model . Topic Progress Ċ import Ġorg . opp ia . android . app . model . Topic Progress Database Ċ import Ġorg . opp ia . android . data . persistence . Persistent Cache Store Ċ import Ġorg . opp ia . android . domain . opp ialog ger . Log Storage Module Ċ import Ġorg . opp ia . android . domain . topic . FR ACTION S _ EX PL OR ATION _ ID _ 0 Ċ import Ġorg . opp ia . android . domain . topic . FR ACTION S _ EX PL OR ATION _ ID _ 1 Ċ import Ġorg . opp ia . android . domain . topic . FR ACTION S _ ST ORY _ ID _ 0 Ċ import Ġorg . opp ia . android . domain . topic . FR ACTION S _ TOPIC _ ID Ċ import Ġorg . opp ia . android . domain . topic . RAT IOS _ EX PL OR ATION _ ID _ 0 Ċ import Ġorg . opp ia . android . domain . topic . RAT IOS _ EX PL OR ATION _ ID _ 1 Ċ import Ġorg . opp ia . android . domain . topic . RAT IOS _ EX PL OR ATION _ ID _ 2 Ċ import Ġorg . opp ia . android . domain . topic . RAT IOS _ EX PL OR ATION _ ID _ 3 Ċ import Ġorg . opp ia . android . domain . topic . RAT IOS _ ST ORY _ ID _ 0 Ċ import Ġorg . opp ia . android . domain . topic . RAT IOS _ ST ORY _ ID _ 1 Ċ import Ġorg . opp ia . android . domain . topic . RAT IOS _ TOPIC _ ID Ċ import Ġorg . opp ia . android . domain . topic . TEST _ EX PL OR ATION _ ID _ 2 Ċ import Ġorg . opp ia . android . domain . topic . TEST _ EX PL OR ATION _ ID _ 4 Ċ import Ġorg . opp ia . android . domain . topic . TEST _ EX PL OR ATION _ ID _ 5 Ċ import Ġorg . opp ia . android . domain . topic . TEST _ ST ORY _ ID _ 0 Ċ import Ġorg . opp ia . android . domain . topic . TEST _ ST ORY _ ID _ 2 Ċ import Ġorg . opp ia . android . domain . topic . TEST _ TOPIC _ ID _ 0 Ċ import Ġorg . opp ia . android . domain . topic . TEST _ TOPIC _ ID _ 1 Ċ import Ġorg . opp ia . android . domain . topic . Topic Controller Ċ import Ġorg . opp ia . android . testing . Test Log Reporting Module Ċ import Ġorg . opp ia . android . testing . environment . Test Environment Config Ċ import Ġorg . opp ia . android . testing . ro bo lectric . Ro bo lectric Module Ċ import Ġorg . opp ia . android . testing . threading . Test Coroutine Dispatch ers Ċ import Ġorg . opp ia . android . testing . threading . Test Dispatcher Module Ċ import Ġorg . opp ia . android . testing . time . Fake Opp ia Clock Ċ import Ġorg . opp ia . android . testing . time . Fake Opp ia Clock Module Ċ import Ġorg . opp ia . android . util . caching . Load Lesson Protos From Assets Ċ import Ġorg . opp ia . android . util . data . AsyncResult Ċ import Ġorg . opp ia . android . util . data . DataProvider Ċ import Ġorg . opp ia . android . util . data . Data Providers . Companion . to LiveData Ċ import Ġorg . opp ia . android . util . data . Data Providers Injector Ċ import Ġorg . opp ia . android . util . data . Data Providers Injector Provider Ċ import Ġorg . opp ia . android . util . logging . Logger Module Ċ import Ġorg . opp ia . android . util . networking . Network Connection Util Debug Module Ċ import Ġorg . opp ia . android . util . parser . image . Image Parsing Module Ċ import Ġorg . ro bo lectric . annotation . Config Ċ import Ġorg . ro bo lectric . annotation . Looper Mode Ċ import Ġjava . util . concurrent . TimeUnit Ċ import Ġjavax . inject . Inject Ċ import Ġjavax . inject . Singleton Ċ Ċ /** ĠTests Ġfor Ġ[ Story Progress TestHelper ]. Ġ*/ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ @ Looper Mode ( Looper Mode . Mode . PA USED ) Ċ @ Config ( application Ġ= ĠStory Progress TestHelper Test . Test Application :: class ) Ċ class ĠStory Progress TestHelper Test Ġ{ ĊĊĠ Ġ@ Rule ĊĠ Ġ@ Jvm Field ĊĠ Ġval Ġmock ito Rule : ĠMockito Rule Ġ= ĠMockito JUnit . rule () ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġcontext : ĠContext ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġstory Progress TestHelper : ĠStory Progress TestHelper ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġtopic Controller : ĠTopic Controller ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġpersistent Cache Store Factory : ĠPersistent Cache Store . Factory ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġtest Coroutine Dispatch ers : ĠTest Coroutine Dispatch ers ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġfake Opp ia Clock : ĠFake Opp ia Clock ĊĊĠ Ġ@ Mock ĊĠ Ġlateinit Ġvar Ġmock Topic Observer : ĠObserver < AsyncResult < Topic >> ĊĊĠ Ġ@ Captor ĊĠ Ġlateinit Ġvar Ġtopic Result Captor : ĠArgument Captor < AsyncResult < Topic >> ĊĊĠ Ġ@ Mock ĊĠ Ġlateinit Ġvar Ġmock Topic Progress Database Observer : ĠObserver < AsyncResult < Topic Progress Database >> ĊĊĠ Ġ@ Captor ĊĠ Ġlateinit Ġvar Ġtopic Progress Database Result Captor : ĠArgument Captor < AsyncResult < Topic Progress Database >> ĊĊĠ Ġprivate Ġval Ġprofile Id 0 : ĠProfile Id Ġby Ġlazy Ġ{ ĠProfile Id . newBuilder (). set Internal Id ( 0 ). build () Ġ} ĊĠ Ġprivate Ġval Ġprofile Id 1 : ĠProfile Id Ġby Ġlazy Ġ{ ĠProfile Id . newBuilder (). set Internal Id ( 1 ). build () Ġ} ĊĊĠ Ġ@ Before ĊĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠ ĠsetUp Test Application Component () ĊĠĠĠ Ġfake Opp ia Clock . set Fake Time Mode ( Fake Opp ia Clock . Fake Time Mode . MODE _ UP TIME _ M ILL IS ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun ĠsetUp Test Application Component () Ġ{ ĊĠĠĠ ĠApplication Provider . getApplicationContext < Test Application >(). inject ( this ) ĊĠ Ġ} ĊĊĠ Ġ/* ĠTest Ġtopic Ġchapter Ġcompletion Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ test Topic 0 _ story 0 _ exp 2 _ chapter Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ test Topic 0 _ story 0 _ exp 2 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ test Topic 0 _ story 0 _ exp 5 _ chapter Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 5 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 5 ) ĊĠĠĠ ĠassertThat ( exp 5 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ test Topic 0 _ story 0 _ exp 5 _ story 0 Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġ// ĠThe Ġstory Ġis Ġcompleted Ġsince Ġexp Ġ 5 Ġrequires Ġexp Ġ 2 Ġto Ġbe Ġfinished Ġfirst . ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ test Topic 1 _ story 2 _ exp 4 _ chapter Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 1 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġstory 2 Ġ= Ġtest Topic 1 . get Story ( TEST _ ST ORY _ ID _ 2 ) ĊĠĠĠ Ġval Ġexp 4 Ġ= Ġstory 2 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 4 ) ĊĠĠĠ ĠassertThat ( exp 4 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ test Topic 1 _ story 2 _ exp 4 _ story 2 Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 1 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġstory 2 Ġ= Ġtest Topic 1 . get Story ( TEST _ ST ORY _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( story 2 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ/* ĠTest Ġtopic Ġstory Ġcompletion Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ test Topic 0 _ story 0 _ story Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ test Topic 0 _ story 0 _ topic Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ test Topic 1 _ story 2 _ story Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 1 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġstory 2 Ġ= Ġtest Topic 1 . get Story ( TEST _ ST ORY _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( story 2 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ test Topic 1 _ story 2 _ topic Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 1 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 1 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ test Topic 0 _ story 0 _ topic Is Part ially Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is Part ially Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ/* ĠTest Ġtopic Ġcompletion Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic Done _ test Topic 0 _ topic Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is Completed ()). isTrue () ĊĠĠĠ ĠassertThat ( test Topic 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic Done _ test Topic 1 _ topic Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is Completed ()). isFalse () ĊĠĠĠ ĠassertThat ( test Topic 1 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topics Done _ test Topics _ both Test Topics Are Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topics ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is Completed ()). isTrue () ĊĠĠĠ ĠassertThat ( test Topic 1 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ/* ĠR at ios Ġchapter Ġcompletion Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ rat ios Topic _ story 0 _ exp 0 _ chapter Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 0 Ġ= Ġstory 0 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( exp 0 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ rat ios Topic _ story 0 _ exp 0 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ rat ios Topic _ story 0 _ exp 1 _ chapter Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 1 Ġ= Ġstory 0 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( exp 1 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ rat ios Topic _ story 0 _ exp 1 _ story 0 Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġ// ĠThe Ġstory Ġis Ġcompleted Ġsince Ġexp Ġ 1 Ġrequires Ġexp Ġ 0 Ġto Ġbe Ġfinished Ġfirst . ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ rat ios Topic _ story 1 _ exp 2 _ chapter Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 1 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 1 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ rat ios Topic _ story 1 _ exp 2 _ story 1 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 1 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ rat ios Topic _ story 1 _ exp 3 _ chapter Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 1 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ Ġval Ġexp 3 Ġ= Ġstory 1 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 3 ) ĊĠĠĠ ĠassertThat ( exp 3 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ rat ios Topic _ story 1 _ exp 3 _ story 1 Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 1 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ Ġ// ĠThe Ġstory Ġis Ġcompleted Ġsince Ġexp Ġ 3 Ġrequires Ġexp Ġ 2 Ġto Ġbe Ġfinished Ġfirst . ĊĠĠĠ ĠassertThat ( story 1 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ/* ĠR at ios Ġstory / topic Ġcompletion Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ rat ios Topic _ story 0 _ story Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isTrue () ĊĠĠĠ ĠassertThat ( story 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ rat ios Topic _ story 0 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( rat ios Topic . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ rat ios Topic _ story 1 _ story Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠĠĠ ĠassertThat ( story 1 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ rat ios Topic _ story 1 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( rat ios Topic . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic Done _ rat ios Topic _ topic Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Rat ios Topic ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( rat ios Topic . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ/* ĠFr actions Ġchapter / story / topic Ġcompletion Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ fr actions Topic _ story 0 _ exp 0 _ chapter Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Fr actions Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 0 Ġ= Ġstory 0 . get Chapter ( FR ACTION S _ EX PL OR ATION _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( exp 0 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ fr actions Topic _ story 0 _ exp 0 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Fr actions Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ fr actions Topic _ story 0 _ exp 1 _ chapter Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Fr actions Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 1 Ġ= Ġstory 0 . get Chapter ( FR ACTION S _ EX PL OR ATION _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( exp 1 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ fr actions Topic _ story 0 _ exp 1 _ story 0 Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Fr actions Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġ// ĠThe Ġstory Ġis Ġcompleted Ġsince Ġexp Ġ 1 Ġrequires Ġexp Ġ 0 Ġto Ġbe Ġfinished Ġfirst . ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story Done _ fr actions Topic _ story 0 _ story Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Fr actions Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic Done _ fr actions Topic _ topic Is Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Fr actions Topic ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( fr actions Topic . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ/* ĠTest Ġtopic Ġchapter Ġstarted Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark As InProgress Saved _ test Topic 0 _ story 0 _ exp 2 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark As InProgress Not Saved _ test Topic 0 _ story 0 _ exp 2 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ test Topic 0 _ story 0 _ exp 2 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ test Topic 0 _ story 0 _ exp 2 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark InProgress Saved _ test Topic 0 _ story 0 _ exp 5 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 5 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 5 ) ĊĠĠĠ ĠassertThat ( exp 5 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ test Topic 0 _ story 0 _ exp 5 _ chapter IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 5 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 5 ) ĊĠĠĠ ĠassertThat ( exp 5 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġmark InProgress Saved For Test Topic 0 Story 0 Exp 5 () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġmark InProgress Not Saved For Test Topic 0 Story 0 Exp 5 () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ test Topic 1 _ story 2 _ exp 4 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 1 Story 2 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġstory 2 Ġ= Ġtest Topic 1 . get Story ( TEST _ ST ORY _ ID _ 2 ) ĊĠĠĠ Ġval Ġexp 4 Ġ= Ġstory 2 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 4 ) ĊĠĠĠ ĠassertThat ( exp 4 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ test Topic 1 _ story 2 _ exp 4 _ chapter IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 1 Story 2 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġstory 2 Ġ= Ġtest Topic 1 . get Story ( TEST _ ST ORY _ ID _ 2 ) ĊĠĠĠ Ġval Ġexp 4 Ġ= Ġstory 2 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 4 ) ĊĠĠĠ ĠassertThat ( exp 4 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ test Topic 1 _ story 2 _ exp 4 _ story 2 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 1 Story 2 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġstory 2 Ġ= Ġtest Topic 1 . get Story ( TEST _ ST ORY _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( story 2 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ test Topic 1 _ story 2 _ exp 4 _ story 2 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 1 Story 2 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġstory 2 Ġ= Ġtest Topic 1 . get Story ( TEST _ ST ORY _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( story 2 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ/* ĠTest Ġtopic / story Ġstarted Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ test Topic 0 _ story 0 _ story IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ test Topic 0 _ story 0 _ story IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ test Topic 0 _ story 0 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ test Topic 0 _ story 0 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ test Topic 1 _ story 2 _ story IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 1 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġstory 2 Ġ= Ġtest Topic 1 . get Story ( TEST _ ST ORY _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( story 2 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ test Topic 1 _ story 2 _ story IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 1 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġstory 2 Ġ= Ġtest Topic 1 . get Story ( TEST _ ST ORY _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( story 2 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ test Topic 1 _ story 2 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 1 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ test Topic 1 _ story 2 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 1 Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic As InProgress Saved _ test Topic 0 _ topic IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is InProgress Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( test Topic 1 . is InProgress Saved ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic As InProgress Not Saved _ test Topic 0 _ topic IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is InProgress Not Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( test Topic 1 . is InProgress Not Saved ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic As Started Not Completed _ test Topic 1 _ topic IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is InProgress Saved ()). isFalse () ĊĠĠĠ ĠassertThat ( test Topic 1 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic As InProgress Not Saved _ test Topic 1 _ topic IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( test Topic 0 . is InProgress Not Saved ()). isFalse () ĊĠĠĠ ĠassertThat ( test Topic 1 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topics As InProgress Saved _ test Topics _ one Topic IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topics ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġ// ĠAt Ġleast Ġone Ġof Ġthe Ġtopics Ġis Ġstarted . ĊĠĠĠ ĠassertThat ( listOf ( test Topic 0 , Ġtest Topic 1 ). any Ġ{ Ġit . is InProgress Saved () Ġ}). isTrue () ĊĠĠĠ Ġ// ĠBut Ġneither Ġis Ġcompleted . ĊĠĠĠ ĠassertThat ( test Topic 0 . is Completed ()). isFalse () ĊĠĠĠ ĠassertThat ( test Topic 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topics As InProgress Not Saved _ test Topics _ one Topic IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topics ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġ// ĠAt Ġleast Ġone Ġof Ġthe Ġtopics Ġis Ġstarted . ĊĠĠĠ ĠassertThat ( listOf ( test Topic 0 , Ġtest Topic 1 ). any Ġ{ Ġit . is InProgress Not Saved () Ġ}). isTrue () ĊĠĠĠ Ġ// ĠBut Ġneither Ġis Ġcompleted . ĊĠĠĠ ĠassertThat ( test Topic 0 . is Completed ()). isFalse () ĊĠĠĠ ĠassertThat ( test Topic 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ/* ĠR at ios Ġchapter Ġstarted Ġtests . Ġ*/ ĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ rat ios Topic _ story 0 _ exp 0 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 0 Ġ= Ġstory 0 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( exp 0 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ rat ios Topic _ story 0 _ exp 0 _ chapter IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 0 Ġ= Ġstory 0 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( exp 0 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ rat ios Topic _ story 0 _ exp 0 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ rat ios Topic _ story 0 _ exp 0 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ rat ios Topic _ story 0 _ exp 1 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 1 Ġ= Ġstory 0 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( exp 1 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ rat ios Topic _ story 0 _ exp 1 _ chapter IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 1 Ġ= Ġstory 0 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( exp 1 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ rat ios Topic _ story 0 _ exp 1 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ rat ios Topic _ story 0 _ exp 1 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ rat ios Topic _ story 1 _ exp 2 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 1 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 1 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ rat ios Topic _ story 1 _ exp 2 _ chapter IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 1 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 1 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ rat ios Topic _ story 1 _ exp 2 _ story 1 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 1 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ rat ios Topic _ story 1 _ exp 2 _ story 1 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 1 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ rat ios Topic _ story 1 _ exp 3 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 1 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ Ġval Ġexp 3 Ġ= Ġstory 1 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 3 ) ĊĠĠĠ ĠassertThat ( exp 3 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ rat ios Topic _ story 1 _ exp 3 _ chapter IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 1 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ Ġval Ġexp 3 Ġ= Ġstory 1 . get Chapter ( RAT IOS _ EX PL OR ATION _ ID _ 3 ) ĊĠĠĠ ĠassertThat ( exp 3 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ rat ios Topic _ story 1 _ exp 3 _ story 1 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 1 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ rat ios Topic _ story 1 _ exp 3 _ story 1 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 1 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 1 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ/* ĠR at ios Ġtopic / story Ġstarted Ġtests . Ġ*/ ĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ rat ios Topic _ story 0 _ story IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 0 . is InProgress Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( story 1 . is InProgress Saved ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ rat ios Topic _ story 0 _ story IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 0 . is InProgress Not Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( story 1 . is InProgress Not Saved ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ rat ios Topic _ story 0 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( rat ios Topic . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ rat ios Topic _ story 0 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( rat ios Topic . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ rat ios Topic _ story 1 _ story IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 0 . is InProgress Saved ()). isFalse () ĊĠĠĠ ĠassertThat ( story 1 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ rat ios Topic _ story 1 _ story IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 1 Ġ= Ġrat ios Topic . get Story ( RAT IOS _ ST ORY _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( story 0 . is InProgress Not Saved ()). isFalse () ĊĠĠĠ ĠassertThat ( story 1 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ rat ios Topic _ story 1 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios Story 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( rat ios Topic . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ rat ios Topic _ story 1 _ topic IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios Story 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( rat ios Topic . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic As InProgress Saved _ rat ios Topic _ topic IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Rat ios ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( rat ios Topic . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic As InProgress Not Saved _ rat ios Topic _ topic IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Rat ios ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( rat ios Topic . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ/* ĠFr actions Ġtopic / story / chapter Ġstarted Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ fr actions Topic _ story 0 _ exp 0 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Fr actions Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 0 Ġ= Ġstory 0 . get Chapter ( FR ACTION S _ EX PL OR ATION _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( exp 0 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ fr actions Topic _ story 0 _ exp 0 _ chapter IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Fr actions Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 0 Ġ= Ġstory 0 . get Chapter ( FR ACTION S _ EX PL OR ATION _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( exp 0 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ fr actions Topic _ story 0 _ exp 0 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Fr actions Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ fr actions Topic _ story 0 _ exp 0 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Fr actions Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ fr actions Topic _ story 0 _ exp 1 _ chapter IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Fr actions Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 1 Ġ= Ġstory 0 . get Chapter ( FR ACTION S _ EX PL OR ATION _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( exp 1 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ fr actions Topic _ story 0 _ exp 1 _ chapter IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Fr actions Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 1 Ġ= Ġstory 0 . get Chapter ( FR ACTION S _ EX PL OR ATION _ ID _ 1 ) ĊĠĠĠ ĠassertThat ( exp 1 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ fr actions Topic _ story 0 _ exp 1 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Fr actions Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ fr actions Topic _ story 0 _ exp 1 _ story 0 IsNot Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Fr actions Story 0 Exp 1 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ fr actions Topic _ story 0 _ story IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Fr actions Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ fr actions Topic _ story 0 _ story IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Fr actions Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġfr actions Topic . get Story ( FR ACTION S _ ST ORY _ ID _ 0 ) ĊĠĠĠ ĠassertThat ( story 0 . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Saved _ fr actions Topic _ story 0 _ topic IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Fr actions Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( fr actions Topic . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Story As InProgress Not Saved _ fr actions Topic _ story 0 _ topic IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Fr actions Story 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( fr actions Topic . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic As InProgress Saved _ fr actions Topic _ topic IsIn Progress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Fr actions ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( fr actions Topic . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Topic As InProgress Not Saved _ fr actions Topic _ topic IsIn Progress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Fr actions ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĠĠĠ ĠassertThat ( fr actions Topic . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ/* ĠSpecific Ġstate Ġ& Ġcross - topic Ġtests . Ġ*/ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest InitialState _ all Topics Are Not Started () Ġ{ ĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĊĠĠĠ ĠassertThat ( test Topic 0 . isNot Started ()). isTrue () ĊĠĠĠ ĠassertThat ( test Topic 1 . isNot Started ()). isTrue () ĊĠĠĠ ĠassertThat ( rat ios Topic . isNot Started ()). isTrue () ĊĠĠĠ ĠassertThat ( fr actions Topic . isNot Started ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark All Topics As InProgress Saved _ all Topics Are InProgress Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark All Topics As InProgress Saved ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĊĠĠĠ ĠassertThat ( test Topic 0 . is InProgress Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( test Topic 1 . is InProgress Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( rat ios Topic . is InProgress Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( fr actions Topic . is InProgress Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark All Topics As InProgress Not Saved _ all Topics Are InProgress Not Saved () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark All Topics As InProgress Not Saved ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĊĠĠĠ ĠassertThat ( test Topic 0 . is InProgress Not Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( test Topic 1 . is InProgress Not Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( rat ios Topic . is InProgress Not Saved ()). isTrue () ĊĠĠĠ ĠassertThat ( fr actions Topic . is InProgress Not Saved ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark All Topics Done _ all Topics Are Done () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark All Topics As Completed ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġtest Topic 1 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 1 ) ĊĠĠĠ Ġval Ġrat ios Topic Ġ= Ġget Topic ( profile Id 0 , ĠR AT IOS _ TOPIC _ ID ) ĊĠĠĠ Ġval Ġfr actions Topic Ġ= Ġget Topic ( profile Id 0 , ĠFR ACTION S _ TOPIC _ ID ) ĊĊĠĠĠ ĠassertThat ( test Topic 0 . is Completed ()). isTrue () ĊĠĠĠ ĠassertThat ( test Topic 1 . is Completed ()). isTrue () ĊĠĠĠ ĠassertThat ( rat ios Topic . is Completed ()). isTrue () ĊĠĠĠ ĠassertThat ( fr actions Topic . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest InProgress Saved Chapter _ then Marked Done _ chapter Is Completed () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest InProgress Not Saved Chapter _ then Marked Done _ chapter Is Completed () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ then InProgress Saved _ chapter Is Completed () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ then InProgress Not Saved _ chapter Is Completed () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 0 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is Completed ()). isTrue () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ new er Than Week _ timestamp New er Than Week () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġprogress Database Ġ= Ġget Topic Progress Database ( profile Id 0 ) ĊĠĠĠ Ġval Ġtest Topic 0 Progress Ġ= Ġprogress Database . get Topic Progress ( TEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Progress Ġ= Ġtest Topic 0 Progress . get Story Progress ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Progress Ġ= Ġstory 0 Progress . get Chapter Progress ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĊĠĠĠ Ġval ĠcurrentTime Ġ= Ġfake Opp ia Clock . getCurrent Time Ms () ĊĠĠĠ Ġval Ġtime Since Finished Ġ= ĠcurrentTime Ġ- Ġexp 2 Progress . last Play ed Timestamp ĊĠĠĠ ĠassertThat ( time Since Finished ). is At Most ( TimeUnit . DAYS . to Millis ( 7 )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Done _ older Than Week _ timestamp Ol der Than Week () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġtrue ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġprogress Database Ġ= Ġget Topic Progress Database ( profile Id 0 ) ĊĠĠĠ Ġval Ġtest Topic 0 Progress Ġ= Ġprogress Database . get Topic Progress ( TEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Progress Ġ= Ġtest Topic 0 Progress . get Story Progress ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Progress Ġ= Ġstory 0 Progress . get Chapter Progress ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĊĠĠĠ Ġval ĠcurrentTime Ġ= Ġfake Opp ia Clock . getCurrent Time Ms () ĊĠĠĠ Ġval Ġtime Since Finished Ġ= ĠcurrentTime Ġ- Ġexp 2 Progress . last Play ed Timestamp ĊĠĠĠ ĠassertThat ( time Since Finished ). is At Least ( TimeUnit . DAYS . to Millis ( 7 )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ new er Than Week _ timestamp New er Than Week () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġprogress Database Ġ= Ġget Topic Progress Database ( profile Id 0 ) ĊĠĠĠ Ġval Ġtest Topic 0 Progress Ġ= Ġprogress Database . get Topic Progress ( TEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Progress Ġ= Ġtest Topic 0 Progress . get Story Progress ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Progress Ġ= Ġstory 0 Progress . get Chapter Progress ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĊĠĠĠ Ġval ĠcurrentTime Ġ= Ġfake Opp ia Clock . getCurrent Time Ms () ĊĠĠĠ Ġval Ġtime Since Play ed Ġ= ĠcurrentTime Ġ- Ġexp 2 Progress . last Play ed Timestamp ĊĠĠĠ ĠassertThat ( time Since Play ed ). is At Most ( TimeUnit . DAYS . to Millis ( 7 )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ new er Than Week _ timestamp New er Than Week () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġprogress Database Ġ= Ġget Topic Progress Database ( profile Id 0 ) ĊĠĠĠ Ġval Ġtest Topic 0 Progress Ġ= Ġprogress Database . get Topic Progress ( TEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Progress Ġ= Ġtest Topic 0 Progress . get Story Progress ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Progress Ġ= Ġstory 0 Progress . get Chapter Progress ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĊĠĠĠ Ġval ĠcurrentTime Ġ= Ġfake Opp ia Clock . getCurrent Time Ms () ĊĠĠĠ Ġval Ġtime Since Play ed Ġ= ĠcurrentTime Ġ- Ġexp 2 Progress . last Play ed Timestamp ĊĠĠĠ ĠassertThat ( time Since Play ed ). is At Most ( TimeUnit . DAYS . to Millis ( 7 )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter InProgress Saved _ older Than Week _ timestamp Ol der Than Week () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġtrue ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġprogress Database Ġ= Ġget Topic Progress Database ( profile Id 0 ) ĊĠĠĠ Ġval Ġtest Topic 0 Progress Ġ= Ġprogress Database . get Topic Progress ( TEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Progress Ġ= Ġtest Topic 0 Progress . get Story Progress ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Progress Ġ= Ġstory 0 Progress . get Chapter Progress ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĊĠĠĠ Ġval ĠcurrentTime Ġ= Ġfake Opp ia Clock . getCurrent Time Ms () ĊĠĠĠ Ġval Ġtime Since Play ed Ġ= ĠcurrentTime Ġ- Ġexp 2 Progress . last Play ed Timestamp ĊĠĠĠ ĠassertThat ( time Since Play ed ). is At Least ( TimeUnit . DAYS . to Millis ( 7 )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter InProgress Not Saved _ older Than Week _ timestamp Ol der Than Week () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġtrue ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġprogress Database Ġ= Ġget Topic Progress Database ( profile Id 0 ) ĊĠĠĠ Ġval Ġtest Topic 0 Progress Ġ= Ġprogress Database . get Topic Progress ( TEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Progress Ġ= Ġtest Topic 0 Progress . get Story Progress ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Progress Ġ= Ġstory 0 Progress . get Chapter Progress ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĊĠĠĠ Ġval ĠcurrentTime Ġ= Ġfake Opp ia Clock . getCurrent Time Ms () ĊĠĠĠ Ġval Ġtime Since Play ed Ġ= ĠcurrentTime Ġ- Ġexp 2 Progress . last Play ed Timestamp ĊĠĠĠ ĠassertThat ( time Since Play ed ). is At Least ( TimeUnit . DAYS . to Millis ( 7 )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter Complete _ on One Profile _ not Completed On Other Profile () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark Completed Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 1 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Saved _ on One Profile _ not Started On Other Profile () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 1 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is Started Not Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Mark Chapter As InProgress Not Saved _ on One Profile _ not Started On Other Profile () Ġ{ ĊĠĠĠ Ġstory Progress TestHelper . mark InProgress Not Saved Test Topic 0 Story 0 Exp 0 ( ĊĠĠĠĠĠ Ġprofile Id Ġ= Ġprofile Id 0 , ĊĠĠĠĠĠ Ġtimestamp Ol der Than One Week Ġ= Ġfalse ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġtest Topic 0 Ġ= Ġget Topic ( profile Id 1 , ĠTEST _ TOPIC _ ID _ 0 ) ĊĠĠĠ Ġval Ġstory 0 Ġ= Ġtest Topic 0 . get Story ( TEST _ ST ORY _ ID _ 0 ) ĊĠĠĠ Ġval Ġexp 2 Ġ= Ġstory 0 . get Chapter ( TEST _ EX PL OR ATION _ ID _ 2 ) ĊĠĠĠ ĠassertThat ( exp 2 . is Started Not Completed ()). isFalse () ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġget Topic ( profile Id : ĠProfile Id , Ġtopic Id : ĠString ): ĠTopic Ġ{ ĊĠĠĠ Ġreturn Ġretrieve Successful Result ( ĊĠĠĠĠĠ Ġtopic Controller . get Topic ( profile Id , Ġtopic Id ), Ġmock Topic Observer , Ġtopic Result Captor ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun ĠTopic . get Story ( story Id : ĠString ): ĠStory Summary Ġ{ ĊĠĠĠ Ġreturn Ġstory List . find Ġ{ Ġit . story Id Ġ== Ġstory Id Ġ} Ġ?: Ġerror (" Failed Ġto Ġfind Ġstory : Ġ$ story Id ") ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun ĠTopic . isNot Started (): ĠBoolean Ġ= Ġstory List . all Ġ{ Ġit . isNot Started () Ġ} ĊĊĠ Ġprivate Ġfun ĠTopic . is Started Not Completed (): ĠBoolean Ġ= Ġstory List . any Ġ{ Ġit . is Started Not Completed () Ġ} ĊĊĠ Ġprivate Ġfun ĠTopic . is InProgress Saved (): ĠBoolean Ġ= Ġstory List . any Ġ{ Ġit . is InProgress Saved () Ġ} ĊĊĠ Ġprivate Ġfun ĠTopic . is InProgress Not Saved (): ĠBoolean Ġ= Ġstory List . any Ġ{ Ġit . is InProgress Not Saved () Ġ} ĊĊĠ Ġprivate Ġfun ĠTopic . is Part ially Completed (): ĠBoolean Ġ= Ġstory List . any Ġ{ Ġit . is Completed () Ġ} ĊĊĠ Ġprivate Ġfun ĠTopic . is Completed (): ĠBoolean Ġ= Ġstory List . all Ġ{ Ġit . is Completed () Ġ} ĊĊĠ Ġprivate Ġfun ĠStory Summary . get Chapter ( exp Id : ĠString ): ĠChapter Summary Ġ{ ĊĠĠĠ Ġreturn Ġchapter List . find Ġ{ Ġit . ex ploration Id Ġ== Ġexp Id Ġ} Ġ?: Ġerror (" Failed Ġto Ġfind Ġchapter : Ġ$ exp Id ") ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun ĠStory Summary . isNot Started (): ĠBoolean Ġ= Ġchapter List . all Ġ{ Ġit . isNot Started () Ġ} ĊĊĠ Ġprivate Ġfun ĠStory Summary . is Started Not Completed (): ĠBoolean Ġ= ĊĠĠĠ Ġchapter List . any Ġ{ Ġit . is Started Not Completed () Ġ} ĊĊĠ Ġprivate Ġfun ĠStory Summary . is InProgress Saved (): ĠBoolean Ġ= Ġchapter List . any Ġ{ Ġit . is InProgress Saved () Ġ} ĊĊĠ Ġprivate Ġfun ĠStory Summary . is InProgress Not Saved (): ĠBoolean Ġ= ĊĠĠĠ Ġchapter List . any Ġ{ Ġit . is InProgress Not Saved () Ġ} ĊĊĠ Ġprivate Ġfun ĠStory Summary . is Completed (): ĠBoolean Ġ= Ġchapter List . all Ġ{ Ġit . is Completed () Ġ} ĊĊĠ Ġprivate Ġfun ĠChapter Summary . isNot Started (): ĠBoolean Ġ= ĊĠĠĠ Ġchapter Play State Ġin ĠlistOf ( ĊĠĠĠĠĠ ĠChapter Play State . NOT _ STARTED , ĠChapter Play State . NOT _ PLAY ABLE _ MISSING _ PR ER EQ UIS ITES ĊĠĠĠ Ġ) ĊĊĠ Ġprivate Ġfun ĠChapter Summary . is Started Not Completed (): ĠBoolean Ġ= ĊĠĠĠ Ġchapter Play State Ġ== ĠChapter Play State . STARTED _ NOT _ COMPLETED ĊĊĠ Ġprivate Ġfun ĠChapter Summary . is InProgress Saved (): ĠBoolean Ġ= ĊĠĠĠ Ġchapter Play State Ġ== ĠChapter Play State . IN _ PROGRESS _ SA VED ĊĊĠ Ġprivate Ġfun ĠChapter Summary . is InProgress Not Saved (): ĠBoolean Ġ= ĊĠĠĠ Ġchapter Play State Ġ== ĠChapter Play State . IN _ PROGRESS _ NOT _ SA VED ĊĊĠ Ġprivate Ġfun ĠChapter Summary . is Completed (): ĠBoolean Ġ= Ġchapter Play State Ġ== ĠChapter Play State . COMPLETED ĊĊĠ Ġprivate Ġfun Ġget Topic Progress Database ( profile Id : ĠProfile Id ): ĠTopic Progress Database Ġ{ ĊĠĠĠ Ġ// ĠHack y Ġway Ġto Ġretrieve Ġthe Ġcurrent Ġprogress Ġdatabase . ĊĠĠĠ Ġval Ġpersistent Cache Store Ġ= ĊĠĠĠĠĠ Ġpersistent Cache Store Factory . create Per Profile ( ĊĠĠĠĠĠĠĠ Ġ" topic _ progress _ database ", ĊĠĠĠĠĠĠĠ ĠTopic Progress Database . getDefaultInstance (), ĊĠĠĠĠĠĠĠ Ġprofile Id ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġreturn Ġretrieve Successful Result ( ĊĠĠĠĠĠ Ġpersistent Cache Store , Ġmock Topic Progress Database Observer , Ġtopic Progress Database Result Captor ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun ĠTopic Progress Database . get Topic Progress ( topic Id : ĠString ): ĠTopic Progress Ġ{ ĊĠĠĠ Ġreturn Ġtopic Progress Map [ topic Id ] Ġ?: Ġerror (" Failed Ġto Ġget Ġprogress Ġfor Ġtopic : Ġ$ topic Id ") ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun ĠTopic Progress . get Story Progress ( story Id : ĠString ): ĠStory Progress Ġ{ ĊĠĠĠ Ġreturn Ġstory Progress Map [ story Id ] Ġ?: Ġerror (" Failed Ġto Ġget Ġprogress Ġfor Ġstory : Ġ$ story Id ") ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun ĠStory Progress . get Chapter Progress ( exp Id : ĠString ): ĠChapter Progress Ġ{ ĊĠĠĠ Ġreturn Ġchapter Progress Map [ exp Id ] Ġ?: Ġerror (" Failed Ġto Ġget Ġprogress Ġfor Ġchapter : Ġ$ exp Id ") ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġ< T > Ġretrieve Successful Result ( ĊĠĠĠ Ġdata Provider : ĠData Provider < T >, ĊĠĠĠ Ġmock Observer : ĠObserver < AsyncResult < T >>, ĊĠĠĠ Ġmock Result Captor : ĠArgument Captor < AsyncResult < T >> ĊĠ Ġ): ĠT Ġ{ ĊĠĠĠ Ġval Ġrequest LiveData Ġ= Ġdata Provider . to LiveData () ĊĠĠĠ Ġreset ( mock Observer ) ĊĠĠĠ Ġrequest LiveData . observe Fore ver ( mock Observer ) ĊĊĠĠĠ Ġ// ĠProvide Ġtime Ġfor Ġthe Ġtopic Ġretrieval Ġto Ġcomplete . ĊĠĠĠ Ġtest Coroutine Dispatch ers . run Current () ĊĊĠĠĠ Ġverify ( mock Observer , Ġat Least Once ()). on Changed ( mock Result Captor . capture ()) ĊĠĠĠ Ġrequest LiveData . remove Observer ( mock Observer ) ĊĠĠĠ Ġval Ġresult Ġ= Ġmock Result Captor . value ĊĠĠĠ ĠassertThat ( result . is Success ()). isTrue () ĊĠĠĠ Ġreturn Ġresult . get OrThrow () ĊĠ Ġ} ĊĊĠ Ġ// ĠTODO (# 8 9 ): ĠMove Ġthis Ġto Ġa Ġcommon Ġtest Ġapplication Ġcomponent . ĊĠ Ġ@ Module ĊĠ Ġclass ĠTest Module Ġ{ ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Context ( application : ĠApplication ): ĠContext Ġ{ ĊĠĠĠĠĠ Ġreturn Ġapplication ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Load Lesson Protos From Assets ĊĠĠĠ Ġfun Ġprovide Load Lesson Protos From Assets ( test Environment Config : ĠTest Environment Config ): ĠBoolean Ġ= ĊĠĠĠĠĠ Ġtest Environment Config . is Using B azel () ĊĠ Ġ} ĊĊĠ Ġ// ĠTODO (# 8 9 ): ĠMove Ġthis Ġto Ġa Ġcommon Ġtest Ġapplication Ġcomponent . ĊĠ Ġ@ Singleton ĊĠ Ġ@ Component ( ĊĠĠĠ Ġmodules Ġ= Ġ[ ĊĠĠĠĠĠ ĠTest Module :: class , ĠTest Log Reporting Module :: class , ĠLog Storage Module :: class , ĊĠĠĠĠĠ ĠTest Dispatcher Module :: class , ĠRo bo lectric Module :: class , ĠFake Opp ia Clock Module :: class , ĊĠĠĠĠĠ ĠImage Parsing Module :: class , ĠLogger Module :: class , ĠNetwork Connection Util Debug Module :: class ĊĠĠĠ Ġ] ĊĠ Ġ) ĊĠ Ġinterface ĠTest Application Component Ġ: ĠData Providers Injector Ġ{ ĊĠĠĠ Ġ@ Component . Builder ĊĠĠĠ Ġinterface ĠBuilder Ġ{ ĊĠĠĠĠĠ Ġ@ Bind s Instance ĊĠĠĠĠĠ Ġfun Ġset Application ( application : ĠApplication ): ĠBuilder ĊĊĠĠĠĠĠ Ġfun Ġbuild (): ĠTest Application Component ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġinject ( story Progress TestHelper Test : ĠStory Progress TestHelper Test ) ĊĠ Ġ} ĊĊĠ Ġclass ĠTest Application Ġ: ĠApplication (), ĠData Providers Injector Provider Ġ{ ĊĠĠĠ Ġprivate Ġval Ġcomponent : ĠTest Application Component Ġby Ġlazy Ġ{ ĊĠĠĠĠĠ ĠD agger Story Progress TestHelper Test _ Test Application Component . builder () ĊĠĠĠĠĠĠĠ Ġ. set Application ( this ) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġinject ( story Progress TestHelper Test : ĠStory Progress TestHelper Test ) Ġ{ ĊĠĠĠĠĠ Ġcomponent . inject ( story Progress TestHelper Test ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetData Providers Injector (): ĠData Providers Injector Ġ= Ġcomponent ĊĠ Ġ} Ċ } Ċ