File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
mockito-kotlin/src/main/kotlin/com/nhaarman/mockitokotlin2
tests/src/test/kotlin/test Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,8 @@ fun description(description: String): VerificationMode {
165
165
* interaction rather than failing immediately if has not already happened. May be useful for testing in concurrent
166
166
* conditions.
167
167
*/
168
- fun after (millis : Long ): VerificationAfterDelay ? {
169
- return Mockito .after(millis)
168
+ fun after (millis : Long ): VerificationAfterDelay {
169
+ return Mockito .after(millis)!!
170
170
}
171
171
172
172
/* *
Original file line number Diff line number Diff line change @@ -103,4 +103,12 @@ class VerificationTest : TestBase() {
103
103
expect(e.message).toContain(" Test" )
104
104
}
105
105
}
106
+
107
+ @Test
108
+ fun testAfter () {
109
+ mock<Methods >().apply {
110
+ int(3 )
111
+ verify(this , after(10 )).int(3 )
112
+ }
113
+ }
106
114
}
You can’t perform that action at this time.
0 commit comments