fun <E, T : List<E>> Expect<T>.get(index: Int): Expect<E>
(source)
Expects that the given index is within the bounds of the subject of the assertion (a List) and returns an Expect for the element at that position.
AssertionError
- Might throw an AssertionError if the given index is out of bound.
Return
The newly created Expect for the element at position index.
fun <E, T : List<E>> Expect<T>.get(index: Int, assertionCreator: Expect<E>.() -> Unit): Expect<T>
(source)
Expects that the given index is within the bounds of the subject of the assertion (a List) and that the element at that position holds all assertions the given assertionCreator creates for it.
AssertionError
- Might throw an AssertionError if the given index is out of bound.
Return
An Expect for the current subject of the assertion.