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

commonTest.ImmediateWorkRunnerTest.kt Maven / Gradle / Ivy

package kt.mobius.runners

import kotlin.test.BeforeTest
import kotlin.test.Test

class ImmediateWorkRunnerTest {

    lateinit var underTest: ImmediateWorkRunner

    @BeforeTest
    fun setUp() {
        underTest = ImmediateWorkRunner()
    }

    @Test
    fun shouldNotRunAfterDispose() {
        underTest.dispose()
        underTest.post(
            object : Runnable {
                override fun run() {
                    throw AssertionError("should not execute runnables after dispose")
                }
            })
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy