io.mockk.impl.recording.states.StubbingState.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockk-common Show documentation
Show all versions of mockk-common Show documentation
Common(JS and Java) MockK module
The newest version!
package io.mockk.impl.recording.states
import io.mockk.MockKException
import io.mockk.impl.recording.CommonCallRecorder
class StubbingState(recorder: CommonCallRecorder) : RecordingState(recorder) {
override fun recordingDone(): CallRecordingState {
checkMissingCalls()
return recorder.factories.stubbingAwaitingAnswerState(recorder)
}
private fun checkMissingCalls() {
if (recorder.calls.isEmpty()) {
throw MockKException("Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock")
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy