index

fun <T> Assert<Array<T>>.index(index: Int): Assert<T>

Returns an assert that assertion on the value at the given index in the array.

assertThat(arrayOf(0, 1, 2)).index(1).isPositive()

fun <T> Assert<List<T>>.index(index: Int): Assert<T>

Returns an assert that assertion on the value at the given index in the list.

assertThat(listOf(0, 1, 2)).index(1).isPositive()