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

in.specmatic.test.ResultAssert.kt Maven / Gradle / Ivy

There is a newer version: 1.3.39
Show newest version
package `in`.specmatic.test

import `in`.specmatic.core.Result
import org.assertj.core.api.AbstractAssert

class ResultAssert(result: Result) : AbstractAssert(result, ResultAssert::class.java) {
    companion object {
        fun assertThat(actual: Result): ResultAssert {
            return ResultAssert(actual)
        }
    }

    fun isSuccess() {
        isNotNull

        actual.let {
            if(it is Result.Failure) {
                failWithMessage(it.toFailureReport("Testing scenario").toText())
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy