Emil Kantis
06/10/2021, 7:28 PMPoint
data class Point(val x: Int, val y: Int)
val x = 7
val mockPoint = mockk<Point> {
every { x } returns x
}
If the receiver in the every
block would be <T> (or Point in this case), I believe x would bind correctly, but perhaps that causes other issues?knthmn
06/11/2021, 1:20 AMval mockPoint = mockk<Point> {
every { this@mockk.x } returns x
}