From d6d52cea04271da61c051e65de3381158b4a35db Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Fri, 18 Jul 2014 18:39:03 -0400 Subject: [PATCH] Add a test for removing a book --- .../downloader/manager/InstalledManagerTest.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/androidTest/java/org/bspeice/minimalbible/test/activity/downloader/manager/InstalledManagerTest.java b/app/src/androidTest/java/org/bspeice/minimalbible/test/activity/downloader/manager/InstalledManagerTest.java index 9c22aa4..a67a37e 100644 --- a/app/src/androidTest/java/org/bspeice/minimalbible/test/activity/downloader/manager/InstalledManagerTest.java +++ b/app/src/androidTest/java/org/bspeice/minimalbible/test/activity/downloader/manager/InstalledManagerTest.java @@ -88,8 +88,17 @@ public class InstalledManagerTest extends TestCase implements Injector { assertFalse(foundMismatch.get()); } - /* public void testRemoveBook() throws Exception { + final AtomicBoolean isRemoved = new AtomicBoolean(false); + getInstalledBooks() + .first() + .subscribe(new Action1() { + @Override + public void call(Book book) { + iM.removeBook(book); + isRemoved.set(!book.getDriver().isDeletable(book)); + } + }); + assertTrue(isRemoved.get()); } - */ } \ No newline at end of file