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
Tryin to mock the android.content.pm.PackageInfo, and stub the versionName.
@Test
fun test_() {
val pInfoMock = mockk<PackageInfo>()
every { pInfoMock.versionName } returns "test_version". //<==got error
// ......
}
it got error:
Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock
io.mockk.MockKException: Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock
at io.mockk.impl.recording.states.StubbingState.checkMissingCalls(StubbingState.kt:14)
at io.mockk.impl.recording.states.StubbingState.recordingDone(StubbingState.kt:8)
at io.mockk.impl.recording.CommonCallRecorder.done(CommonCallRecorder.kt:47)
at io.mockk.impl.eval.RecordedBlockEvaluator.record(RecordedBlockEvaluator.kt:64)
at io.mockk.impl.eval.EveryBlockEvaluator.every(EveryBlockEvaluator.kt:30)
at io.mockk.MockKDsl.internalEvery(API.kt:94)
at io.mockk.MockKKt.every(MockK.kt:143)
what does this mean?
Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock
The text was updated successfully, but these errors were encountered:
Tryin to mock the android.content.pm.PackageInfo, and stub the versionName.
it got error:
what does this mean?
The text was updated successfully, but these errors were encountered: