You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Test
funsampleWriteTest() {
val data ="foo"
mocker.every { sample.sampleProperty = isAny() } returns Unit
testable.writeValue(data)
mocker.verify { sample.sampleProperty = data }
}
@Test
funsampleReadTest() {
val data ="foo"
mocker.every { sample.sampleProperty } returns data
val result = testable.readValue()
assertEquals(data, result)
}
For example, I have a class under test and a mock
I would like to write a test for methods
writeValue
andreadValue
, for example:For now I'm getting
MockSample.(get/set):sampleProperty has not been mocked
error each time I run test.How to properly write rules in this case?
The text was updated successfully, but these errors were encountered: