
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
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 calls inside every { ... } block.")
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy