doc / ch.tutteli.atrium.api.cc.infix.en_GB / get

get

infix fun <E : Any, T : List<E>> Assert<T>.get(index: Int): AssertionPlant<E>
Deprecated: Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.

Makes the assertion that the given index is within the bounds of Assert.subject, creates a feature assertion plant for the corresponding element and returns the newly created plant.

Exceptions

AssertionError - Might throw an AssertionError if the given index is out of bound.

Return
This plant to support a fluent API.

infix fun <E : Any, T : List<E>> Assert<T>.get(index: Index): ListGetOption<E, T>
Deprecated: Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.

Prepares the assertion about the return value of calling get with the given index.

Return
A fluent builder to finish the assertion.