We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Previously worked in version 5.1.0.
This test fails:
@ExtendWith(MockitoExtension::class) class MockitoTest { class Consumer<T>(val fn: (T) -> Unit) class Mocked { fun <T> callConsumer(consumer: Consumer<T>, value: T) { consumer.fn(value) } } @Mock private lateinit var mocked: Mocked @Test fun testPrimitives() { var functionCalled = false val aConsumer = Consumer<UShort> {} whenever(mocked.callConsumer(same(aConsumer), any())).then { functionCalled = true } mocked.callConsumer(aConsumer, 42u) assertTrue(functionCalled) } }
but works when you change the type parameter to Short:
Short
@ExtendWith(MockitoExtension::class) class MockitoTest { class Consumer<T>(val fn: (T) -> Unit) class Mocked { fun <T> callConsumer(consumer: Consumer<T>, value: T) { consumer.fn(value) } } @Mock private lateinit var mocked: Mocked @Test fun testPrimitives() { var functionCalled = false val aConsumer = Consumer<Short> {} whenever(mocked.callConsumer(same(aConsumer), any())).then { functionCalled = true } mocked.callConsumer(aConsumer, 42) assertTrue(functionCalled) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Previously worked in version 5.1.0.
This test fails:
but works when you change the type parameter to
Short
:The text was updated successfully, but these errors were encountered: