All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.copperleaf.ballast.test.internal.vm.TestEventHandlerScope.kt Maven / Gradle / Ivy

There is a newer version: 4.2.1
Show newest version
package com.copperleaf.ballast.test.internal.vm

import com.copperleaf.ballast.EventHandlerScope
import kotlinx.coroutines.CompletableDeferred

internal class TestEventHandlerScope(
    private val eventHandlerScopeDelegate: EventHandlerScope, Events, State>
) : EventHandlerScope {
    override suspend fun postInput(input: Inputs) {
        val deferred = CompletableDeferred()
        eventHandlerScopeDelegate.postInput(
            TestViewModel.Inputs.ProcessInput(input, deferred)
        )
        deferred.await()
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy