endsWith

fun Assert<CharSequence>.endsWith(other: CharSequence, ignoreCase: Boolean = false)

Asserts the char sequence ends with the expected char sequence.

Parameters

ignoreCase

true to compare ignoring case, the default if false.

See also


fun Assert<List<*>>.endsWith(vararg elements: Any?)

Asserts the list ends with the expected elements, in the same order.

1, 2, 3 endsWith 2, 3 pass 1, 2, 3 endsWith 3, 2 fails 1, 2, 3 endsWith 1, 2, 3 pass [] endsWith 1, 2 fails 1, 2 endsWith [] pass [] endsWith [] pass

See also