Skip to content

Commit

Permalink
Main dependencies updated:
Browse files Browse the repository at this point in the history
 - gradle wrapper to 8.1
 - mockito-core to version 5.7.0
 - few other related changes
  • Loading branch information
Nynuzoud committed Nov 30, 2023
1 parent 49f62c9 commit e0dbd48
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions tests/src/test/kotlin/test/OngoingStubbingTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ import org.junit.Assume.assumeFalse
import org.junit.Test
import org.mockito.Mockito
import org.mockito.exceptions.misusing.UnfinishedStubbingException
import org.mockito.kotlin.*
import org.mockito.kotlin.any
import org.mockito.kotlin.argThat
import org.mockito.kotlin.check
import org.mockito.kotlin.doAnswer
import org.mockito.kotlin.doReturn
import org.mockito.kotlin.doReturnConsecutively
import org.mockito.kotlin.doThrow
import org.mockito.kotlin.mock
import org.mockito.kotlin.stub
import org.mockito.kotlin.stubbing
import org.mockito.kotlin.whenever
import org.mockito.stubbing.Answer
import kotlin.check

class OngoingStubbingTest : TestBase() {

Expand Down Expand Up @@ -288,14 +297,13 @@ class OngoingStubbingTest : TestBase() {

@Test
fun doReturn_withGenericIntReturnType_on() {
/* Expect */
expectErrorWithMessage("onGeneric") on {

/* When */
mock<GenericMethods<Int>> {
on { genericMethod() } doReturn 2
}
/* When */
val mock = mock<GenericMethods<Int>> {
on { genericMethod() } doReturn 2
}

/* Then */
expect(mock.genericMethod()).toBe(2)
}

@Test
Expand Down

0 comments on commit e0dbd48

Please sign in to comment.