From a77076c96c46e207073455255901bfc5c939814f Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Mon, 16 Feb 2015 09:19:49 -0500 Subject: [PATCH] Fix the build... --- .../downloader/manager/BookManagerTest.java | 7 ++-- .../test/activity/viewer/BibleViewerTest.java | 42 ------------------- 2 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 app/src/androidTest/java/org/bspeice/minimalbible/test/activity/viewer/BibleViewerTest.java diff --git a/app-test/src/test/java/org/bspeice/minimalbible/test/activity/downloader/manager/BookManagerTest.java b/app-test/src/test/java/org/bspeice/minimalbible/test/activity/downloader/manager/BookManagerTest.java index 8190a82..35ec8f0 100644 --- a/app-test/src/test/java/org/bspeice/minimalbible/test/activity/downloader/manager/BookManagerTest.java +++ b/app-test/src/test/java/org/bspeice/minimalbible/test/activity/downloader/manager/BookManagerTest.java @@ -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 events) { - return new MBIndexManager(events, indexManager); + MBIndexManager mbIndexManager(IndexManager indexManager) { + return new MBIndexManager(indexManager); } @Provides diff --git a/app/src/androidTest/java/org/bspeice/minimalbible/test/activity/viewer/BibleViewerTest.java b/app/src/androidTest/java/org/bspeice/minimalbible/test/activity/viewer/BibleViewerTest.java deleted file mode 100644 index 1fffb70..0000000 --- a/app/src/androidTest/java/org/bspeice/minimalbible/test/activity/viewer/BibleViewerTest.java +++ /dev/null @@ -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 { - - 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())); - Modules.testModules.setBookManager(mockBookManager); - - assertNotNull(getActivity()); - } - -} \ No newline at end of file