????????1??????->?????????->????Completed???->????????????->?л???????->??????????????????
????M??????????????????——TasksLocalDataSourceTest
??????????????????д???Task???????顢???Task??????в????
???????壺??ò??CRUD?????????????????????????????????????????
??????1??saveTask_retrievesTask
???????????????????Task???????????
???????????????????Task????->???????->????ID???Task->?????????ж?????????Task???
??????2??completeTask_retrievedTaskIsComplete
????????????????????????ó???????????
??????????????Task?????????->???????????????->????ID???Task->?????????ж????Task?????
??????3??activateTask_retrievedTaskIsActive
?????????????????????????????????????
??????????????mock??????????callback->Task?????????->???????????????->????????????????->????ID???Task->????callback?????onTaskLoaded?????
??????4??clearCompletedTask_taskNotRetrievable
???????????????????????????????????
??????????????mock????????????????????callback1??3->????????1??????2??????3??????????1??????2?completed????????3?active??->??????????????????->????3??Task??ID?????Task->????callback1??callback2?????onDataNotAvailable???- >????callback3???onTaskLoaded???
??????5??deleteAllTasks_emptyListOfRetrievedTask
?????????????????????????????????????
??????????????????????->mock??????????callback->???????????->????????б?->????callback?????onDataNotAvailable?????
??????6??getTasks_retrieveSavedTasks
?????????????????????????????????????
??????????????????2??????->????????б?->?????????ж?????2?????????
????????androidTestMock????μ????
????????????????У?????????????????????????????????????Fake???????????????????????????????????????
????V??????????????????——AddEditTaskScreenTest
????errorShownOnEmptyTask
???????????????????????????????????????????Snackbar??????????
?????????????????????->??????????????->???????->???Snackbar????????????Snackbar?????
????V???????????——StatisticsScreenTest
????Tasks_ShowsNonEmptyMessage
????????????->????Fake???????????????????Completed??Active->?????????????????????
????V????????????????——TaskDetailScreenTest
??????????Fake???????????????????????б?????????????????
???????壺?????????ζ????????????????Fake??
????activeTaskDetails_DisplayedInUi
????Fake??????Active??????->???????->???????????????????
????completedTaskDetails_DisplayedInUi
????Fake??????Complete??????->???????->???????????????????
????orientationChange_menuAndTaskPersist
????????????????????TasksScreenTest????£??????????
???????test??????μ????
????P???????????????——AddEditTaskPresenterTest
??????????????Presenter?????????????????????????????????????????????????????????View???Model????????AddEditTaskPresenter???????????????????createTask??updateTask??populateTask??????????????????????????????????????漰?????????????????????4????????????
???????壺??ЩPresenter??????????????????Mock?????verify????β?????????????????????????Presenter??????????·????
????saveNewTaskToRepository_showsSuccessMessageUi
????????Presenter????д???????????->????Model??????????????->????View???????????????б?????
????saveTask_emptyTaskShowsErrorUi
????????Presenter????д???????????????????Title???->????View?????????error?????
????saveExistingTaskToRepository_showsSuccessMessageUi
?????????????????update??????????????????1??
????populateTask_callsRepoAndUpdatesView
?????????????????????????????????????
??????????????presenter???populateTask()->?????????getTask()??????????->???????????????????????->????View?????????????Task????
????P???????????——StatisticsPresenterTest
???????????????presenter????????????????????start????е?????????????????????й??????漰????·??????????????б?????????????б?????????????????????1??2??3??
????loadEmptyTasksFromRepository_CallViewToDisplay
?????????????????б?
????loadNonEmptyTasksFromRepository_CallViewToDisplay
??????????????????б?
????loadStatisticsWhenTasksAreUnavailable_CallErrorToDisplay
?????????????????
????P?????????鸚?????——TaskDetailPresenterTest
????????????Presenter????5??????????????
start???????????飬?漰????·??????Active??????Compeled??????????ID?????????1??2??3?????????
deleteTask??????????????4??????????
completeTask??????????????5??
activateTask???????????????6??
editTask?????????????7?????????ID????????????????????8??
getActiveTaskFromRepositoryAndLoadIntoView
getCompletedTaskFromRepositoryAndLoadIntoView
getUnknownTaskFromRepositoryAndLoadIntoView
deleteTask
completeTask
activateTask
activeTaskIsShownWhenEditing
invalidTaskIsNotShownWhenEditing
????P???????б???????——TasksPresenterTest
????????????TasksPresenter????????????????????????????????????10??????????????????8???????????????????All/Active/Completed???????б??????????????????????????????
loadAllTasksFromRepositoryAndLoadIntoView
loadActiveTasksFromRepositoryAndLoadIntoView
loadCompletedTasksFromRepositoryAndLoadIntoView
clickOnFab_ShowsAddTaskUi
clickOnTask_ShowsDetailUi
completeTask_ShowsTaskMarkedComplete
activateTask_ShowsTaskMarkedActive
unavailableTasks_ShowsError
????M??????????????????——TasksRepositoryTest
????????????????????????????????????????????????????????????????????????????????????????м???????????
getTasks_repositoryCachesAfterFirstApiCall
getTasks_requestsAllTasksFromLocalDataSource
saveTask_savesTaskToServiceAPI
completeTask_completesTaskToServiceAPIUpdatesCache
completeTaskId_completesTaskToServiceAPIUpdatesCache
activateTask_activatesTaskToServiceAPIUpdatesCache
activateTaskId_activatesTaskToServiceAPIUpdatesCache
getTask_requestsSingleTaskFromLocalDataSource
deleteCompletedTasks_deleteCompletedTasksToServiceAPIUpdatesCache
deleteAllTasks_deleteTasksToServiceAPIUpdatesCache
deleteTask_deleteTaskToServiceAPIRemovedFromCache
getTasksWithDirtyCache_tasksAreRetrievedFromRemote
getTasksWithLocalDataSourceUnavailable_tasksAreRetrievedFromRemote
getTasksWithBothDataSourcesUnavailable_firesOnDataUnavailable
getTaskWithBothDataSourcesUnavailable_firesOnDataUnavailable
getTasks_refreshesLocalDataSource