kotest-assertions-core / io.kotest.matchers.sequences

Package io.kotest.matchers.sequences

Extensions for External Classes

kotlin.sequences.Sequence

Functions

atLeastCount

fun <T> atLeastCount(n: Int): Matcher<Sequence<T>>

atMostCount

fun <T> atMostCount(n: Int): Matcher<Sequence<T>>

beEmpty

fun <T> beEmpty(): Matcher<Sequence<T>>

beLargerThan

fun <T, U> beLargerThan(other: Sequence<U>): Matcher<Sequence<T>>

beSameCountAs

fun <T, U> beSameCountAs(other: Sequence<U>): Matcher<Sequence<T>>

beSmallerThan

fun <T, U> beSmallerThan(other: Sequence<U>): Matcher<Sequence<T>>

beSorted

fun <T : Comparable<T>> beSorted(): Matcher<Sequence<T>>

beSortedWith

fun <T> beSortedWith(comparator: Comparator<in T>): Matcher<Sequence<T>>
fun <T> beSortedWith(cmp: (T, T) -> Int): Matcher<Sequence<T>>

beUnique

fun <T> beUnique(): Matcher<Sequence<T>>

contain

fun <T, C : Sequence<T>> contain(t: T): Matcher<C>

containAll

fun <T, C : Sequence<T>> containAll(ts: C): Matcher<Sequence<T>>

containAllInAnyOrder

fun <T> containAllInAnyOrder(vararg expected: T): Matcher<Sequence<T>?>

Assert that a sequence contains all the given values and nothing else, in any order.

fun <T, C : Sequence<T>> containAllInAnyOrder(expected: C): Matcher<C?>

containDuplicates

fun <T> containDuplicates(): Matcher<Sequence<T>>

containExactly

fun <T> containExactly(vararg expected: T): Matcher<Sequence<T>?>

Assert that a sequence contains exactly the given values and nothing else, in order.

fun <T, C : Sequence<T>> containExactly(expected: C): Matcher<C?>

containExactlyInAnyOrder

fun <T> containExactlyInAnyOrder(vararg expected: T): Matcher<Sequence<T>?>

Assert that a sequence contains the given values and nothing else, in any order.

fun <T, C : Sequence<T>> containExactlyInAnyOrder(expected: C): Matcher<C?>

containNoNulls

fun <T> containNoNulls(): Matcher<Sequence<T>>

containNull

fun <T> containNull(): Matcher<Sequence<T>>

containOnlyNulls

fun <T> containOnlyNulls(): Matcher<Sequence<T>>

containsInOrder

Assert that a sequence contains a given subsequence, possibly with values in between.

fun <T> containsInOrder(subsequence: Sequence<T>): Matcher<Sequence<T>?>

exist

fun <T> exist(p: (T) -> Boolean): Matcher<Sequence<T>>

haveCount

fun <T> haveCount(count: Int): Matcher<Sequence<T>>

haveElementAt

fun <T, S : Sequence<T>> haveElementAt(index: Int, element: T): Matcher<S>

haveLowerBound

fun <T : Comparable<T>, C : Sequence<T>> haveLowerBound(t: T): Matcher<C>

haveSize

fun <T> haveSize(size: Int): Matcher<Sequence<T>>

haveUpperBound

fun <T : Comparable<T>, C : Sequence<T>> haveUpperBound(t: T): Matcher<C>

shouldContain

infix fun <T, C : Sequence<T>> C.shouldContain(t: T): Unit

shouldContainAllInAnyOrder

infix fun <T, C : Sequence<T>> C?.shouldContainAllInAnyOrder(expected: C): Unit
fun <T, C : Sequence<T>> C?.shouldContainAllInAnyOrder(vararg expected: T): Unit

shouldContainExactly

infix fun <T, C : Sequence<T>> C?.shouldContainExactly(expected: C): Unit
fun <T, C : Sequence<T>> C?.shouldContainExactly(vararg expected: T): Unit

shouldContainExactlyInAnyOrder

infix fun <T, C : Sequence<T>> C?.shouldContainExactlyInAnyOrder(expected: C): Unit
fun <T, C : Sequence<T>> C?.shouldContainExactlyInAnyOrder(vararg expected: T): Unit

shouldHaveLowerBound

infix fun <T : Comparable<T>, C : Sequence<T>> C.shouldHaveLowerBound(t: T): Unit

shouldHaveUpperBound

infix fun <T : Comparable<T>, C : Sequence<T>> C.shouldHaveUpperBound(t: T): Unit

shouldNotContain

infix fun <T, C : Sequence<T>> C.shouldNotContain(t: T): Unit

shouldNotContainAllInAnyOrder

infix fun <T, C : Sequence<T>> C?.shouldNotContainAllInAnyOrder(expected: C): Unit
fun <T, C : Sequence<T>> C?.shouldNotContainAllInAnyOrder(vararg expected: T): Unit

shouldNotContainExactly

infix fun <T, C : Sequence<T>> C?.shouldNotContainExactly(expected: C): Unit
fun <T, C : Sequence<T>> C?.shouldNotContainExactly(vararg expected: T): Unit

shouldNotContainExactlyInAnyOrder

infix fun <T, C : Sequence<T>> C?.shouldNotContainExactlyInAnyOrder(expected: C): Unit
fun <T, C : Sequence<T>> C?.shouldNotContainExactlyInAnyOrder(vararg expected: T): Unit

singleElement

fun <T> singleElement(t: T): Matcher<Sequence<T>>

sorted

fun <T : Comparable<T>> sorted(): Matcher<Sequence<T>>

sortedWith

fun <T> sortedWith(comparator: Comparator<in T>): Matcher<Sequence<T>>
fun <T> sortedWith(cmp: (T, T) -> Int): Matcher<Sequence<T>>