assertContains

fun <T> assertContains(iterable: Iterable<T>, element: T, message: String? = null)(source)

Asserts that the iterable contains the specified element, with an optional message.

Since Kotlin

1.5

fun <T> assertContains(sequence: <Error class: unknown class><T>, element: T, message: String? = null)(source)

Asserts that the sequence contains the specified element, with an optional message.

Since Kotlin

1.5

fun <T> assertContains(array: Array<T>, element: T, message: String? = null)(source)
fun assertContains(array: ByteArray, element: Byte, message: String? = null)(source)
fun assertContains(array: ShortArray, element: Short, message: String? = null)(source)
fun assertContains(array: IntArray, element: Int, message: String? = null)(source)
fun assertContains(array: LongArray, element: Long, message: String? = null)(source)
fun assertContains(array: BooleanArray, element: Boolean, message: String? = null)(source)
fun assertContains(array: CharArray, element: Char, message: String? = null)(source)
fun assertContains(array: <Error class: unknown class>, element: <Error class: unknown class>, message: String? = null)(source)
fun assertContains(array: <Error class: unknown class>, element: <Error class: unknown class>, message: String? = null)(source)
fun assertContains(array: <Error class: unknown class>, element: <Error class: unknown class>, message: String? = null)(source)
fun assertContains(array: <Error class: unknown class>, element: <Error class: unknown class>, message: String? = null)(source)

Asserts that the array contains the specified element, with an optional message.

Since Kotlin

1.5

fun assertContains(range: IntRange, value: Int, message: String? = null)(source)
fun assertContains(range: LongRange, value: Long, message: String? = null)(source)
fun <T : Comparable<T>> assertContains(range: ClosedRange<T>, value: T, message: String? = null)(source)
fun assertContains(range: CharRange, value: Char, message: String? = null)(source)
fun assertContains(range: <Error class: unknown class>, value: <Error class: unknown class>, message: String? = null)(source)
fun assertContains(range: <Error class: unknown class>, value: <Error class: unknown class>, message: String? = null)(source)

Asserts that the range contains the specified value, with an optional message.

Since Kotlin

1.5

fun <T : Comparable<T>> assertContains(range: OpenEndRange<T>, value: T, message: String? = null)(source)

Asserts that the range contains the specified value, with an optional message.

Since Kotlin

1.7

fun <K, V> assertContains(map: Map<K, V>, key: K, message: String? = null)(source)

Asserts that the map contains the specified key, with an optional message.

Since Kotlin

1.5

fun assertContains(charSequence: CharSequence, char: Char, ignoreCase: Boolean = false, message: String? = null)(source)

Asserts that the charSequence contains the specified char, with an optional message.

Since Kotlin

1.5

Parameters

ignoreCase

true to ignore character case when comparing characters. By default false.


fun assertContains(charSequence: CharSequence, other: CharSequence, ignoreCase: Boolean = false, message: String? = null)(source)

Asserts that the charSequence contains the specified other char sequence as a substring, with an optional message.

Since Kotlin

1.5

Parameters

ignoreCase

true to ignore character case when comparing strings. By default false.


fun assertContains(charSequence: CharSequence, regex: <Error class: unknown class>, message: String? = null)(source)

Asserts that the charSequence contains at least one match of the specified regular expression regex, with an optional message.

Since Kotlin

1.5