jvmTest.RecordingModelObserver.kt Maven / Gradle / Ivy
package kt.mobius
import kt.mobius.functions.Consumer
class RecordingModelObserver : Consumer {
private val recorder = RecordingConsumer()
override fun accept(newModel: S) {
recorder.accept(newModel)
}
/*fun waitForChange(timeoutMs: Long): Boolean {
return recorder.waitForChange(timeoutMs)
}*/
fun valueCount(): Int {
return recorder.valueCount()
}
@SafeVarargs
fun assertStates(vararg expectedStates: S) {
recorder.assertValues(*expectedStates)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy