File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
mockito-kotlin/src/test/kotlin/test Expand file tree Collapse file tree 1 file changed +12
-4
lines changed 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