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
Hello, I am trying to mock android AssistStrcuture.ViewNode I am able to mock everything except ViewNode.htmlInfo.attributes it is a list of android.util.Pair class.
I have tried multiple things but nothing seems to work, can someone help me with the issue?
[✅] I am running the latest version
[✅ ] I checked the documentation and found no answer
[✅] I checked to make sure that this issue has not already been filed
MockK version: 1.13.10
OS: Windows
Kotlin version: 1.9.20
Type of test: unit test
Stack trace
io.mockk.MockKException: Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock
at app//io.mockk.impl.recording.states.StubbingState.checkMissingCalls(StubbingState.kt:14)
at app//io.mockk.impl.recording.states.StubbingState.recordingDone(StubbingState.kt:8)
at app//io.mockk.impl.recording.CommonCallRecorder.done(CommonCallRecorder.kt:47)
at app//io.mockk.impl.eval.RecordedBlockEvaluator.record(RecordedBlockEvaluator.kt:63)
at app//io.mockk.impl.eval.EveryBlockEvaluator.every(EveryBlockEvaluator.kt:30)
at app//io.mockk.MockKDsl.internalEvery(API.kt:94)
at app//io.mockk.MockKKt.every(MockK.kt:143)
...
Minimal reproducible code (the gist of this issue)
val mockedAttributes: android.util.Pair<String, String> = mockk(relaxed =true)
every { mockedAttributes.toString() } returns "Works as expected"
every { mockedAttributes.first } returns "throws io.mockk.MockKException: Missing mocked calls inside every "
The text was updated successfully, but these errors were encountered:
Hello, I am trying to mock android
AssistStrcuture.ViewNode
I am able to mock everything exceptViewNode.htmlInfo.attributes
it is a list ofandroid.util.Pair
class.I have tried multiple things but nothing seems to work, can someone help me with the issue?
Stack trace
Minimal reproducible code (the gist of this issue)
The text was updated successfully, but these errors were encountered: