Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make after() return type non-null #351

Merged
merged 1 commit into from Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -165,8 +165,8 @@ fun description(description: String): VerificationMode {
* interaction rather than failing immediately if has not already happened. May be useful for testing in concurrent
* conditions.
*/
fun after(millis: Long): VerificationAfterDelay? {
return Mockito.after(millis)
fun after(millis: Long): VerificationAfterDelay {
return Mockito.after(millis)!!
}

/**
Expand Down
8 changes: 8 additions & 0 deletions tests/src/test/kotlin/test/VerificationTest.kt
Expand Up @@ -103,4 +103,12 @@ class VerificationTest : TestBase() {
expect(e.message).toContain("Test")
}
}

@Test
fun testAfter() {
mock<Methods>().apply {
int(3)
verify(this, after(10)).int(3)
}
}
}