main.kotlin.com.intuit.playerui.utils.test.TestMocks.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testutils Show documentation
Show all versions of testutils Show documentation
A cross-platform semantic rendering engine
The newest version!
package com.intuit.playerui.utils.test
import com.intuit.playerui.core.flow.Flow
import com.intuit.playerui.utils.mocks.ClassLoaderMock
import com.intuit.playerui.utils.mocks.ClassLoaderMocksReader
import kotlinx.serialization.json.Json
public val ClassLoaderMocksReader.simpleMock: ClassLoaderMock
get() = findMockByName("collection-basic") ?: throw PlayerTestException("Could not find mock by name: collection-basic")
public val mocks: ClassLoaderMocksReader by lazy {
ClassLoaderMocksReader()
}
public val simpleFlowString: String by lazy {
mocks.simpleMock.getFlow()
}
public val simpleFlow: Flow by lazy {
Json { ignoreUnknownKeys = true }
.decodeFromString(Flow.serializer(), simpleFlowString)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy