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

jvmMain.tech.skot.core.test.SKViewModelTester.kt Maven / Gradle / Ivy

The newest version!
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 - 2024 Weber Informatics LLC | Privacy Policy