mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-04 23:28:19 -05:00
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:
parent
40c706c4ab
commit
0451d9443f
@ -10,8 +10,6 @@ import org.bspeice.minimalbible.activity.downloader.manager.InstalledManager;
|
||||
import org.bspeice.minimalbible.activity.downloader.manager.RefreshManager;
|
||||
import org.crosswire.jsword.book.Book;
|
||||
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.Installer;
|
||||
|
||||
@ -123,33 +121,4 @@ public class InstalledManagerTest extends TestCase implements Injector {
|
||||
});
|
||||
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.");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user