Skip to content

Commit 72279be

Browse files
authored
Merge pull request #123 from nhaarman/release-0.12.1
Release 0.12.1
2 parents ebc6147 + c974db0 commit 72279be

File tree

6 files changed

+24
-8
lines changed

6 files changed

+24
-8
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ language: java
55
matrix:
66
include:
77
- jdk: oraclejdk7
8-
env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.0.5
8+
env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.0.5-2
99
- jdk: oraclejdk7
1010
env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.1-M02
1111
- jdk: oraclejdk8
12-
env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.0.5
12+
env: TERM=dumb KOTLIN_VERSION=1.0.5-2
1313
- jdk: oraclejdk8
14-
env: TERM=dumb MOCK_MAKER=mock-maker-inline KOTLIN_VERSION=1.1-M02
14+
env: TERM=dumb KOTLIN_VERSION=1.1-M02
1515

1616

1717
env:

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@
2424
#
2525

2626
isRelease = false
27-
publishToLocal = false

mockito-kotlin/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply from: './publishing.gradle'
33
apply plugin: 'org.jetbrains.dokka'
44

55
buildscript {
6-
ext.kotlin_version = System.getenv("KOTLIN_VERSION") ?: '1.0.5'
6+
ext.kotlin_version = System.getenv("KOTLIN_VERSION") ?: '1.0.5-2'
77

88
repositories {
99
mavenCentral()
@@ -26,7 +26,7 @@ repositories {
2626
dependencies {
2727
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
2828
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
29-
compile "org.mockito:mockito-core:2.2.15"
29+
compile "org.mockito:mockito-core:2.2.17"
3030

3131
/* Tests */
3232
testCompile "junit:junit:4.12"

mockito-kotlin/publishing.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ uploadArchives {
4040
)
4141
}
4242

43-
if (publishToLocal) repository(url: mavenLocal().url)
44-
4543
pom.project {
4644
name 'Mockito-Kotlin'
4745
packaging 'jar'

mockito-kotlin/src/main/kotlin/com/nhaarman/mockito_kotlin/Mockito.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ fun doThrow(vararg toBeThrown: Throwable): Stubber = Mockito.doThrow(*toBeThrown
7676
fun <T> eq(value: T): T = Mockito.eq(value) ?: value
7777
fun ignoreStubs(vararg mocks: Any): Array<out Any> = Mockito.ignoreStubs(*mocks)!!
7878
fun inOrder(vararg mocks: Any): InOrder = Mockito.inOrder(*mocks)!!
79+
fun inOrder(vararg mocks: Any, evaluation: InOrder.() -> Unit) = Mockito.inOrder(*mocks).evaluation()
7980

8081
inline fun <reified T : Any> isA(): T? = Mockito.isA(T::class.java)
8182
fun <T : Any> isNotNull(): T? = Mockito.isNotNull()

mockito-kotlin/src/test/kotlin/test/MockitoTest.kt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package test
2+
23
import com.nhaarman.expect.expect
34
import com.nhaarman.expect.expectErrorWithMessage
45
import com.nhaarman.expect.fail
@@ -177,6 +178,23 @@ class MockitoTest : TestBase() {
177178
}
178179
}
179180

181+
@Test
182+
fun testInOrderWithLambda() {
183+
/* Given */
184+
val a = mock<() -> Unit>()
185+
val b = mock<() -> Unit>()
186+
187+
/* When */
188+
b()
189+
a()
190+
191+
/* Then */
192+
inOrder(a, b) {
193+
verify(b).invoke()
194+
verify(a).invoke()
195+
}
196+
}
197+
180198
@Test
181199
fun testClearInvocations() {
182200
val mock = mock<Methods>().apply {

0 commit comments

Comments
 (0)