mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-25 09:28:21 -05:00
Make sure the unit tests pass correctly
This commit is contained in:
parent
cbb4b5fd14
commit
67b11b3ab0
@ -86,5 +86,7 @@ dependencies {
|
|||||||
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:+'
|
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:+'
|
||||||
|
|
||||||
// Email debug reports if I crash...
|
// Email debug reports if I crash...
|
||||||
testConfigCompile 'ch.acra:acra:+'
|
testConfigCompile('ch.acra:acra:+') {
|
||||||
|
exclude module: 'json'
|
||||||
|
}
|
||||||
}
|
}
|
@ -4,7 +4,7 @@ import android.test.ActivityInstrumentationTestCase2;
|
|||||||
|
|
||||||
import org.bspeice.minimalbible.Modules;
|
import org.bspeice.minimalbible.Modules;
|
||||||
import org.bspeice.minimalbible.activity.viewer.BibleViewer;
|
import org.bspeice.minimalbible.activity.viewer.BibleViewer;
|
||||||
import org.bspeice.minimalbible.activity.viewer.BookManager;
|
import org.bspeice.minimalbible.service.manager.BookManager;
|
||||||
import org.crosswire.jsword.book.Book;
|
import org.crosswire.jsword.book.Book;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -7,15 +7,16 @@ import org.crosswire.jsword.book.Book
|
|||||||
import rx.functions.Action0
|
import rx.functions.Action0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by bspeice on 9/10/14.
|
* 'Open' class and values for mockito to subclass
|
||||||
|
* http://confluence.jetbrains.com/display/Kotlin/Classes+and+Inheritance
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//@Singleton
|
//@Singleton
|
||||||
class BookManager() {
|
open class BookManager() {
|
||||||
// Some extra books like to think they're installed, but trigger NPE all over the place...
|
// Some extra books like to think they're installed, but trigger NPE all over the place...
|
||||||
val ignore = array("ERen_no", "ot1nt2");
|
val ignore = array("ERen_no", "ot1nt2");
|
||||||
|
|
||||||
val installedBooks = Observable.from(Books.installed()!!.getBooks())
|
open val installedBooks = Observable.from(Books.installed()!!.getBooks())
|
||||||
?.filter { !ignore.contains(it!!.getInitials()) }
|
?.filter { !ignore.contains(it!!.getInitials()) }
|
||||||
?.cache()
|
?.cache()
|
||||||
var refreshComplete = false;
|
var refreshComplete = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user