File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
main/kotlin/com/nhaarman/mockitokotlin2 Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ fun inOrder(vararg mocks: Any): InOrder {
192
192
*
193
193
* Alias for [Mockito.inOrder].
194
194
*/
195
- fun inOrder (
195
+ inline fun inOrder (
196
196
vararg mocks : Any ,
197
197
evaluation : InOrder .() -> Unit
198
198
) {
Original file line number Diff line number Diff line change 3
3
package test
4
4
5
5
import com.nhaarman.expect.expect
6
- import com.nhaarman.mockitokotlin2.doReturn
7
- import com.nhaarman.mockitokotlin2.mock
8
- import com.nhaarman.mockitokotlin2.verify
9
- import com.nhaarman.mockitokotlin2.verifyBlocking
6
+ import com.nhaarman.mockitokotlin2.*
10
7
import kotlinx.coroutines.experimental.CommonPool
11
8
import kotlinx.coroutines.experimental.delay
12
9
import kotlinx.coroutines.experimental.runBlocking
@@ -139,6 +136,17 @@ class CoroutinesTest {
139
136
140
137
verifyBlocking(m) { suspending() }
141
138
}
139
+
140
+ @Test
141
+ fun verifySuspendMethod () = runBlocking {
142
+ val testSubject : SomeInterface = mock()
143
+
144
+ testSubject.suspending()
145
+
146
+ inOrder(testSubject) {
147
+ verify(testSubject).suspending()
148
+ }
149
+ }
142
150
}
143
151
144
152
interface SomeInterface {
You can’t perform that action at this time.
0 commit comments