jvmMain.tech.skot.core.test.SKViewModelTester.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of viewmodelTests Show documentation
Show all versions of viewmodelTests Show documentation
viewmodelTests description
package tech.skot.core.test
import tech.skot.core.components.SKComponent
import tech.skot.core.components.SKComponentViewMock
import tech.skot.core.components.SKScreen
import kotlin.reflect.KProperty1
abstract class SKViewModelTester(val component: SKComponent<*>) {
val view: V = component.view as V
val model: M by lazy {
(component::class.members.first { it.name == "model" } as KProperty1)
.get(component) as M
}
val screen:SKScreen<*> by lazy {
component as SKScreen<*>
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy