commonMain.com.copperleaf.ballast.test.internal.vm.TestSideEffectScope.kt Maven / Gradle / Ivy
package com.copperleaf.ballast.test.internal.vm
import com.copperleaf.ballast.SideEffectScope
import kotlinx.coroutines.CompletableDeferred
internal class TestSideEffectScope(
private val sideEffectScopeDelegate: SideEffectScope, Events, State>
) : SideEffectScope {
override suspend fun postInput(input: Inputs) {
val deferred = CompletableDeferred()
sideEffectScopeDelegate.postInput(
TestViewModel.Inputs.ProcessInput(input, deferred)
)
deferred.await()
}
override suspend fun postEvent(event: Events) {
sideEffectScopeDelegate.postEvent(event)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy