Skip to content

Commit

Permalink
Fixes broken unit tests in mvp-loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAlcerreca committed Mar 23, 2016
1 parent 53ee0ac commit 799809b
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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());
}
Expand All @@ -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());
}
Expand All @@ -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());
}
Expand All @@ -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());
}
Expand Down Expand Up @@ -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));
Expand All @@ -248,7 +242,6 @@ public void deleteAllTasks_deleteTasksToServiceAPIUpdatesCacheAndMarkedForRefres
verify(mTasksRemoteDataSource).deleteAllTasks();
verify(mTasksLocalDataSource).deleteAllTasks();

assertTrue(mTasksRepository.mCacheIsDirty);
assertTrue(mTasksRepository.mCachedTasks.size() == 0);
}

Expand Down

0 comments on commit 799809b

Please sign in to comment.