mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-21 07:28:18 -05:00
Fix the build...
This commit is contained in:
parent
52573534ef
commit
a77076c96c
@ -7,8 +7,8 @@ import org.bspeice.minimalbible.Injector;
|
||||
import org.bspeice.minimalbible.activity.downloader.DownloadPrefs;
|
||||
import org.bspeice.minimalbible.activity.downloader.manager.BookManager;
|
||||
import org.bspeice.minimalbible.activity.downloader.manager.DLProgressEvent;
|
||||
import org.bspeice.minimalbible.activity.downloader.manager.MBIndexManager;
|
||||
import org.bspeice.minimalbible.activity.downloader.manager.RefreshManager;
|
||||
import org.bspeice.minimalbible.activity.search.MBIndexManager;
|
||||
import org.crosswire.common.progress.JobManager;
|
||||
import org.crosswire.common.progress.Progress;
|
||||
import org.crosswire.common.progress.WorkEvent;
|
||||
@ -280,9 +280,8 @@ public class BookManagerTest implements Injector {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
MBIndexManager mbIndexManager(IndexManager indexManager,
|
||||
PublishSubject<DLProgressEvent> events) {
|
||||
return new MBIndexManager(events, indexManager);
|
||||
MBIndexManager mbIndexManager(IndexManager indexManager) {
|
||||
return new MBIndexManager(indexManager);
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
@ -1,42 +0,0 @@
|
||||
package org.bspeice.minimalbible.test.activity.viewer;
|
||||
|
||||
import android.test.ActivityInstrumentationTestCase2;
|
||||
|
||||
import org.bspeice.minimalbible.Modules;
|
||||
import org.bspeice.minimalbible.activity.viewer.BibleViewer;
|
||||
import org.bspeice.minimalbible.service.manager.BookManager;
|
||||
import org.crosswire.jsword.book.Book;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import rx.Observable;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class BibleViewerTest extends ActivityInstrumentationTestCase2<BibleViewer> {
|
||||
|
||||
public BibleViewerTest() {
|
||||
super(BibleViewer.class);
|
||||
}
|
||||
|
||||
public void setUp() {
|
||||
// For some reason this test requires us to set the dexcache...
|
||||
System.setProperty("dexmaker.dexcache", getInstrumentation().getTargetContext()
|
||||
.getCacheDir().toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* It may happen to be the case that we start and there are no installed books.
|
||||
* This likely triggers a runtime exception from Rx, and is no excuse for dying.
|
||||
*/
|
||||
public void testInitializationNoInstalledBooks() {
|
||||
BookManager mockBookManager = mock(BookManager.class);
|
||||
when(mockBookManager.getInstalledBooks()).thenReturn(
|
||||
Observable.from(new ArrayList<Book>()));
|
||||
Modules.testModules.setBookManager(mockBookManager);
|
||||
|
||||
assertNotNull(getActivity());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user