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 {
165165 * interaction rather than failing immediately if has not already happened. May be useful for testing in concurrent
166166 * conditions.
167167 */
168- fun after (millis : Long ): VerificationAfterDelay ? {
169- return Mockito .after(millis)
168+ fun after (millis : Long ): VerificationAfterDelay {
169+ return Mockito .after(millis)!!
170170}
171171
172172/* *
Original file line number Diff line number Diff line change @@ -103,4 +103,12 @@ class VerificationTest : TestBase() {
103103 expect(e.message).toContain(" Test" )
104104 }
105105 }
106+
107+ @Test
108+ fun testAfter () {
109+ mock<Methods >().apply {
110+ int(3 )
111+ verify(this , after(10 )).int(3 )
112+ }
113+ }
106114}
You can’t perform that action at this time.
0 commit comments