com.oneeyedmen.kSera.hamkresting.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of k-sera Show documentation
Show all versions of k-sera Show documentation
A Kotlin Wrapper for JMock
The newest version!
package com.oneeyedmen.kSera
import com.natpryce.hamkrest.MatchResult
import com.natpryce.hamkrest.Matcher
import org.hamcrest.Description
fun Matcher.asHamcrest(): org.hamcrest.Matcher {
return object : org.hamcrest.BaseMatcher() {
@Suppress("UNCHECKED_CAST")
override fun matches(item: Any?): Boolean {
return [email protected](item as T) is MatchResult.Match
}
override fun describeTo(description: Description) {
description.appendText([email protected])
}
}
}