File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
subprojects/tdd-in-kotlin/src/test/kotlin/org/sdkotlin/tdd/mockk Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ package org.sdkotlin.tdd.mockk
2+
3+ import io.mockk.every
4+ import io.mockk.mockk
5+ import org.assertj.core.api.Assertions.assertThat
6+ import org.junit.jupiter.api.Disabled
7+ import org.junit.jupiter.api.Test
8+
9+ interface ValueClassSuperType
10+
11+ @JvmInline
12+ value class ValueClass (val s : String ) : ValueClassSuperType
13+
14+ data class TestDataClass (val v : ValueClassSuperType )
15+
16+ class MockKValueClassParameterTest {
17+
18+ @Test
19+ @Disabled(" https://github.com/mockk/mockk/issues/1342" )
20+ fun `test value class parameter` () {
21+
22+ val testValue = ValueClass (" testing" )
23+
24+ val mock = mockk<TestDataClass > {
25+ every { v } returns testValue
26+ }
27+
28+ assertThat(mock.v).isEqualTo(testValue)
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments