assertk.assertions / contains

contains

fun <T> Assert<Array<T>>.contains(element: Any?): Unit

Platform and version requirements: Common

Asserts the array contains the expected element, using in.

See Also

doesNotContain

fun Assert<Iterable<*>>.contains(element: Any?): Unit

Platform and version requirements: Common

Asserts the iterable contains the expected element, using in.

See Also

doesNotContain

fun <K, V> Assert<Map<K, V>>.contains(key: K, value: V): Unit

Platform and version requirements: Common


fun <K, V> Assert<Map<K, V>>.contains(element: <ERROR CLASS><K, V>): Unit

Platform and version requirements: Common

Asserts the map contains the expected key-value pair.

See Also

doesNotContain

fun Assert<String>.contains(other: CharSequence, ignoreCase: Boolean = false): Unit

Platform and version requirements: Common

Asserts the string contains the expected string.

Parameters

ignoreCase - true to compare ignoring case, the default if false.