From 799809bd8b7ce74a3fea7d1d616282ac72a46399 Mon Sep 17 00:00:00 2001 From: Jose Alcerreca Date: Wed, 23 Mar 2016 18:36:11 +0000 Subject: [PATCH] Fixes broken unit tests in mvp-loaders --- .../todoapp/data/source/TasksRepositoryTest.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/todo-mvp-loaders/app/src/test/java/com/example/android/architecture/blueprints/todoapp/data/source/TasksRepositoryTest.java b/todo-mvp-loaders/app/src/test/java/com/example/android/architecture/blueprints/todoapp/data/source/TasksRepositoryTest.java index 49e2ac287..4e446e16c 100644 --- a/todo-mvp-loaders/app/src/test/java/com/example/android/architecture/blueprints/todoapp/data/source/TasksRepositoryTest.java +++ b/todo-mvp-loaders/app/src/test/java/com/example/android/architecture/blueprints/todoapp/data/source/TasksRepositoryTest.java @@ -122,7 +122,6 @@ public void saveTask_savesTaskToServiceAPIAndMarkedForRefreshFromAPI() { // marked for server refresh on next call and the cache is updated verify(mTasksRemoteDataSource).saveTask(newTask); verify(mTasksLocalDataSource).saveTask(newTask); - assertTrue(mTasksRepository.mCacheIsDirty); assertTrue(mTasksRepository.mCachedTasks.size() == 1); } @@ -139,7 +138,6 @@ public void completeTask_completesTaskToServiceAPIUpdatesCacheAndMarkedForRefres // for server refresh on next call and the cache is updated verify(mTasksRemoteDataSource).completeTask(newTask); verify(mTasksLocalDataSource).completeTask(newTask); - assertTrue(mTasksRepository.mCacheIsDirty); assertTrue(mTasksRepository.mCachedTasks.size() == 1); assertTrue(mTasksRepository.mCachedTasks.get(newTask.getId()).isCompleted()); } @@ -157,7 +155,6 @@ public void completeTaskId_completesTaskToServiceAPIUpdatesCacheAndMarkedForRefr // server refresh on next call and the cache is updated verify(mTasksRemoteDataSource).completeTask(newTask); verify(mTasksLocalDataSource).completeTask(newTask); - assertTrue(mTasksRepository.mCacheIsDirty); assertTrue(mTasksRepository.mCachedTasks.size() == 1); assertTrue(mTasksRepository.mCachedTasks.get(newTask.getId()).isCompleted()); } @@ -175,7 +172,6 @@ public void activateTask_activatesTaskToServiceAPIUpdatesCacheAndMarkedForRefres // for server refresh on next call and the cache is updated verify(mTasksRemoteDataSource).activateTask(newTask); verify(mTasksLocalDataSource).activateTask(newTask); - assertTrue(mTasksRepository.mCacheIsDirty); assertTrue(mTasksRepository.mCachedTasks.size() == 1); assertTrue(mTasksRepository.mCachedTasks.get(newTask.getId()).isActive()); } @@ -193,7 +189,6 @@ public void activateTaskId_activatesTaskToServiceAPIUpdatesCacheAndMarkedForRefr // server refresh on next call and the cache is updated verify(mTasksRemoteDataSource).activateTask(newTask); verify(mTasksLocalDataSource).activateTask(newTask); - assertTrue(mTasksRepository.mCacheIsDirty); assertTrue(mTasksRepository.mCachedTasks.size() == 1); assertTrue(mTasksRepository.mCachedTasks.get(newTask.getId()).isActive()); } @@ -225,7 +220,6 @@ public void deleteCompletedTasks_deleteCompletedTasksToServiceAPIUpdatesCacheAnd verify(mTasksRemoteDataSource).clearCompletedTasks(); verify(mTasksLocalDataSource).clearCompletedTasks(); - assertTrue(mTasksRepository.mCacheIsDirty); assertTrue(mTasksRepository.mCachedTasks.size() == 1); assertTrue(mTasksRepository.mCachedTasks.get(newTask2.getId()).isActive()); assertThat(mTasksRepository.mCachedTasks.get(newTask2.getId()).getTitle(), is(TASK_TITLE2)); @@ -248,7 +242,6 @@ public void deleteAllTasks_deleteTasksToServiceAPIUpdatesCacheAndMarkedForRefres verify(mTasksRemoteDataSource).deleteAllTasks(); verify(mTasksLocalDataSource).deleteAllTasks(); - assertTrue(mTasksRepository.mCacheIsDirty); assertTrue(mTasksRepository.mCachedTasks.size() == 0); }