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

commonTest.com.bkahlert.kommons.test.RootCauseKtTest.kt Maven / Gradle / Ivy

There is a newer version: 2.8.0
Show newest version
package com.bkahlert.kommons.test

import kotlin.test.Test

class RootCauseKtTest {

    @Test fun root_cause() = testAll(
        IllegalArgumentException("error message"),
        IllegalStateException(IllegalArgumentException("error message")),
        RuntimeException(IllegalStateException(IllegalArgumentException("error message"))),
        Error(RuntimeException(IllegalStateException(IllegalArgumentException("error message")))),
        RuntimeException(Error(RuntimeException(IllegalStateException(IllegalArgumentException("error message"))))),
    ) { ex ->
        ex.shouldHaveRootCauseInstanceOf()
        ex.shouldHaveRootCauseMessage("error message")
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy