
it.skrape.matchers.Matchers.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
skrape{it} is a Kotlin-based HTML testing and web scraping library
that can be used seamlessly in both Spring-Boot and other JVM projects.
It places particular emphasis on ease of use, a high level of readability
and attention to performance through the use of non-blocking operations.
The newest version!
package it.skrape.matchers
import org.assertj.core.api.KotlinAssertions.assertThat
infix fun Int.toBe(expected: Int) {
assertThat(this).isEqualTo(expected)
}
infix fun Int.`to be`(expected: Int) = this toBe expected
infix fun String?.toBe(expected: String?) {
assertThat(this).isEqualTo(expected)
}
infix fun String?.`to be`(expected: String?) = this toBe expected
infix fun String?.toBeNot(expected: String?) {
assertThat(this).isNotEqualTo(expected)
}
infix fun String?.`to be not`(expected: String?) = this toBeNot expected
infix fun String?.toContain(expected: String) {
assertThat(this.toString()).contains(expected)
}
infix fun String?.`to contain`(expected: String) = this toContain expected
infix fun String?.toNotContain(expected: String) {
assertThat(this.toString()).doesNotContain(expected)
}
infix fun String?.`to not contain`(expected: String) = this toNotContain expected
infix fun List.toContain(expected: String) {
assertThat(this).contains(expected)
}
infix fun List.`to contain`(expected: String) = this.toContain(expected)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy