Remove a useless test

Because I can't remove a book without restarting the application (no idea why this is) it's impossible to test this.
This commit is contained in:
Bradlee Speice 2014-09-01 16:17:43 -04:00
parent 40c706c4ab
commit 0451d9443f

View File

@ -10,8 +10,6 @@ import org.bspeice.minimalbible.activity.downloader.manager.InstalledManager;
import org.bspeice.minimalbible.activity.downloader.manager.RefreshManager; import org.bspeice.minimalbible.activity.downloader.manager.RefreshManager;
import org.crosswire.jsword.book.Book; import org.crosswire.jsword.book.Book;
import org.crosswire.jsword.book.Books; import org.crosswire.jsword.book.Books;
import org.crosswire.jsword.book.BooksEvent;
import org.crosswire.jsword.book.BooksListener;
import org.crosswire.jsword.book.install.InstallManager; import org.crosswire.jsword.book.install.InstallManager;
import org.crosswire.jsword.book.install.Installer; import org.crosswire.jsword.book.install.Installer;
@ -123,33 +121,4 @@ public class InstalledManagerTest extends TestCase implements Injector {
}); });
assertFalse(foundMismatch.get()); assertFalse(foundMismatch.get());
} }
/**
* Test that we can remove a book. Currently this test is neutered until I can fix
* issues with @link{getInstalledBooks}.
* @throws Exception
*/
public void testRemoveBook() throws Exception {
final Book book = getInstalledBooks().toBlocking().first();
final AtomicBoolean didRemove = new AtomicBoolean(false);
installedBooks.addBooksListener(new BooksListener() {
@Override
public void bookAdded(BooksEvent ev) {
}
@Override
public void bookRemoved(BooksEvent ev) {
if (ev.getBook().equals(book)) {
didRemove.set(true);
}
}
});
iM.removeBook(book);
if (!didRemove.get()) {
Log.w("testRemoveBook", "Could not remove book, not necessarily fatal.");
}
}
} }