File tree Expand file tree Collapse file tree 6 files changed +23
-22
lines changed
main/kotlin/com/nhaarman/mockitokotlin2 Expand file tree Collapse file tree 6 files changed +23
-22
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,16 @@ matrix:
1010 env : TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.1.61
1111 - jdk : oraclejdk8
1212 env : TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.2.50
13+ - jdk : oraclejdk8
14+ env : TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.3.0-rc-116
1315 - jdk : oraclejdk8
1416 env : TERM=dumb KOTLIN_VERSION=1.0.7
1517 - jdk : oraclejdk8
1618 env : TERM=dumb KOTLIN_VERSION=1.1.61
1719 - jdk : oraclejdk8
1820 env : TERM=dumb KOTLIN_VERSION=1.2.50
21+ - jdk : oraclejdk8
22+ env : TERM=dumb KOTLIN_VERSION=1.3.0-rc-116
1923
2024
2125env :
Original file line number Diff line number Diff line change @@ -3,11 +3,12 @@ apply from: '../publishing.gradle'
33apply plugin : ' org.jetbrains.dokka'
44
55buildscript {
6- ext. kotlin_version = " 1.2.50 "
6+ ext. kotlin_version = " 1.3.0-rc-146 "
77
88 repositories {
99 mavenCentral()
1010 jcenter()
11+ maven { url ' http://dl.bintray.com/kotlin/kotlin-eap' }
1112 }
1213
1314 dependencies {
@@ -21,21 +22,22 @@ buildscript {
2122repositories {
2223 mavenCentral()
2324 jcenter()
25+ maven { url ' http://dl.bintray.com/kotlin/kotlin-eap' }
2426}
2527
2628dependencies {
2729 compileOnly " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
28- compileOnly ' org.jetbrains.kotlinx:kotlinx-coroutines-core:0.23.3 '
30+ compileOnly ' org.jetbrains.kotlinx:kotlinx-coroutines-core:0.30.0-eap13 '
2931
30- compile " org.mockito:mockito-core:2.21 .0"
32+ compile " org.mockito:mockito-core:2.23 .0"
3133
3234 testCompile ' junit:junit:4.12'
3335 testCompile ' com.nhaarman:expect.kt:1.0.0'
3436
3537 testCompile " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
36- testCompile ' org.jetbrains.kotlinx:kotlinx-coroutines-core:0.23.3 '
38+ testCompile ' org.jetbrains.kotlinx:kotlinx-coroutines-core:0.30.0-eap13 '
3739
38- testImplementation " org.jetbrains.kotlinx:kotlinx-coroutines-android:0.23.3 "
40+ testImplementation " org.jetbrains.kotlinx:kotlinx-coroutines-android:0.30.0-eap13 "
3941}
4042
4143dokka {
@@ -49,10 +51,3 @@ dokka {
4951 }
5052}
5153javadoc. dependsOn dokka
52-
53-
54- kotlin {
55- experimental {
56- coroutines " enable"
57- }
58- }
Original file line number Diff line number Diff line change 2626package com.nhaarman.mockitokotlin2
2727
2828import com.nhaarman.mockitokotlin2.internal.createInstance
29- import kotlinx.coroutines.experimental. runBlocking
29+ import kotlinx.coroutines.runBlocking
3030import org.mockito.Mockito
3131import org.mockito.stubbing.OngoingStubbing
3232import kotlin.reflect.KClass
Original file line number Diff line number Diff line change 2626package com.nhaarman.mockitokotlin2
2727
2828import com.nhaarman.mockitokotlin2.internal.createInstance
29- import kotlinx.coroutines.experimental. runBlocking
29+ import kotlinx.coroutines.runBlocking
3030import org.mockito.InOrder
3131import org.mockito.Mockito
3232import org.mockito.verification.VerificationAfterDelay
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ package test
44
55import com.nhaarman.expect.expect
66import com.nhaarman.mockitokotlin2.*
7- import kotlinx.coroutines.experimental.CommonPool
8- import kotlinx.coroutines.experimental. delay
9- import kotlinx.coroutines.experimental. runBlocking
10- import kotlinx.coroutines.experimental. withContext
7+ import kotlinx.coroutines.Dispatchers
8+ import kotlinx.coroutines.delay
9+ import kotlinx.coroutines.runBlocking
10+ import kotlinx.coroutines.withContext
1111import org.junit.Test
1212
1313
@@ -139,7 +139,7 @@ class CoroutinesTest {
139139
140140 @Test
141141 fun verifySuspendMethod () = runBlocking {
142- val testSubject : SomeInterface = mock()
142+ val testSubject: SomeInterface = mock()
143143
144144 testSubject.suspending()
145145
@@ -157,9 +157,9 @@ interface SomeInterface {
157157
158158class SomeClass {
159159
160- suspend fun result (r : Int ) = withContext(CommonPool ) { r }
160+ suspend fun result (r : Int ) = withContext(Dispatchers . Default ) { r }
161161
162- suspend fun delaying () = withContext(CommonPool ) {
162+ suspend fun delaying () = withContext(Dispatchers . Default ) {
163163 delay(100 )
164164 42
165165 }
Original file line number Diff line number Diff line change 11buildscript {
2- ext. kotlin_version = ' 1.2.50'
32 ext. kotlin_version = System . getenv(" KOTLIN_VERSION" ) ?: ' 1.0.7'
3+ ext. kotlin_version = ' 1.3.0-rc-116'
44
55 repositories {
66 mavenCentral()
7+ maven { url ' http://dl.bintray.com/kotlin/kotlin-eap' }
78 }
89 dependencies {
910 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
@@ -16,6 +17,7 @@ apply plugin: 'kotlin'
1617repositories {
1718 mavenCentral()
1819 jcenter()
20+ maven { url ' http://dl.bintray.com/kotlin/kotlin-eap' }
1921}
2022
2123dependencies {
You can’t perform that action at this time.
0 commit comments