in.specmatic.test.ResultAssert.kt Maven / Gradle / Ivy
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