mirror of
https://github.com/MinimalBible/MinimalBible
synced 2025-07-02 22:34:44 -04:00
Kotlin M11 updates
Looking forward to incorporating some of these things...
This commit is contained in:
@ -6,7 +6,6 @@ apply plugin: 'com.github.kt3k.coveralls'
|
||||
evaluationDependsOn(":app")
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '0.10.770'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
@ -49,7 +48,7 @@ dependencies {
|
||||
testCompile 'org.robolectric:robolectric:2.+'
|
||||
testCompile 'org.mockito:mockito-core:+'
|
||||
testCompile 'com.jayway.awaitility:awaitility:+'
|
||||
testCompile 'org.jetbrains.spek:spek:+'
|
||||
testCompile 'org.jetbrains.spek:spek:0.1-SNAPSHOT'
|
||||
|
||||
testCompile firstVariant.javaCompile.classpath
|
||||
testCompile firstVariant.javaCompile.outputs.files
|
||||
|
@ -1,14 +1,14 @@
|
||||
package org.bspeice.minimalbible.activity.downloader
|
||||
|
||||
import android.content.DialogInterface
|
||||
import org.jetbrains.spek.api.Spek
|
||||
import kotlin.test.assertTrue
|
||||
import android.content.DialogInterface
|
||||
|
||||
/**
|
||||
* Created by bspeice on 11/22/14.
|
||||
*/
|
||||
|
||||
class BookListFragmentSpek : Spek() {{
|
||||
class BookListFragmentSpek : Spek() {init {
|
||||
|
||||
given("A BookListFragment with showDialog() mocked out") {
|
||||
val fragment = object : BookListFragment() {
|
||||
|
@ -4,11 +4,12 @@
|
||||
|
||||
import org.bspeice.minimalbible.activity.downloader.manager.DLProgressEvent
|
||||
import org.crosswire.jsword.book.Book
|
||||
import org.mockito.Mockito.mock
|
||||
import org.jetbrains.spek.api.Spek
|
||||
import org.mockito.Mockito.mock
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class DLProgressEventSpek : Spek() {{
|
||||
|
||||
class DLProgressEventSpek : Spek() {init {
|
||||
|
||||
given("a DLProgressEvent created with 50% progress and a mock book") {
|
||||
val mockBook = mock(javaClass<Book>())
|
||||
|
@ -1,13 +1,13 @@
|
||||
package org.bspeice.minimalbible.activity.downloader.manager
|
||||
|
||||
import org.jetbrains.spek.api.Spek
|
||||
import org.crosswire.common.util.Language
|
||||
import org.jetbrains.spek.api.Spek
|
||||
|
||||
/**
|
||||
* Created by bspeice on 12/14/14.
|
||||
*/
|
||||
|
||||
class LocaleManagerSpek() : Spek() {{
|
||||
class LocaleManagerSpek() : Spek() {init {
|
||||
|
||||
given("some example language objects") {
|
||||
val english = Language("en")
|
||||
|
@ -1,23 +1,23 @@
|
||||
package org.bspeice.minimalbible.activity.downloader.manager
|
||||
|
||||
import org.jetbrains.spek.api.Spek
|
||||
import org.bspeice.minimalbible.activity.downloader.DownloadPrefs
|
||||
import java.util.Calendar
|
||||
import org.crosswire.jsword.book.install.Installer
|
||||
import org.mockito.Mockito.*
|
||||
import org.mockito.Matchers.*
|
||||
import rx.schedulers.Schedulers
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import com.jayway.awaitility.Awaitility
|
||||
import java.util.concurrent.TimeUnit
|
||||
import rx.Subscriber
|
||||
import org.bspeice.minimalbible.activity.downloader.DownloadPrefs
|
||||
import org.crosswire.jsword.book.Book
|
||||
import org.crosswire.jsword.book.install.Installer
|
||||
import org.jetbrains.spek.api.Spek
|
||||
import org.mockito.Matchers.anyLong
|
||||
import org.mockito.Mockito.*
|
||||
import rx.Subscriber
|
||||
import rx.schedulers.Schedulers
|
||||
import java.util.Calendar
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
/**
|
||||
* Created by bspeice on 1/3/15.
|
||||
*/
|
||||
|
||||
class RefreshManagerSpek() : Spek() {{
|
||||
class RefreshManagerSpek() : Spek() {init {
|
||||
|
||||
fun buildRefreshmanager(installers: List<Installer>, prefs: DownloadPrefs) =
|
||||
RefreshManager(installers, listOf(""), prefs, null)
|
||||
|
@ -1,17 +1,17 @@
|
||||
package org.bspeice.minimalbible.activity.search
|
||||
|
||||
import com.jayway.awaitility.Awaitility
|
||||
import org.crosswire.jsword.book.Book
|
||||
import org.crosswire.jsword.index.IndexManager
|
||||
import org.crosswire.jsword.index.IndexStatus
|
||||
import org.jetbrains.spek.api.Spek
|
||||
import org.mockito.Mockito
|
||||
import org.crosswire.jsword.index.IndexManager
|
||||
import org.crosswire.jsword.book.Book
|
||||
import org.crosswire.jsword.index.IndexStatus
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
import kotlin.test.assertEquals
|
||||
import com.jayway.awaitility.Awaitility
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.test.assertTrue
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
import kotlin.test.fail
|
||||
|
||||
/**
|
||||
@ -23,7 +23,7 @@ data class Mocks() {
|
||||
val indexManager = MBIndexManager(mockIndex)
|
||||
}
|
||||
|
||||
class MBIndexManagerSpek() : Spek() {{
|
||||
class MBIndexManagerSpek() : Spek() {init {
|
||||
|
||||
given("a mock IndexManager, Book, and real MBIndexManager") {
|
||||
val mocks = Mocks()
|
||||
|
Reference in New Issue
Block a user