doc / ch.tutteli.atrium.api.infix.en_GB / first

first

val <K, T : Pair<K, *>> Expect<T>.first: Expect<K> (source)

Creates an Expect for the property Pair.first of the subject of this expectation, so that further fluent calls are assertions about it.

Return
The newly created Expect for the extracted feature.

infix fun <K, V, T : Pair<K, V>> Expect<T>.first(assertionCreator: Expect<K>.() -> Unit): Expect<T> (source)

Expects that the property Pair.first of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Return
an Expect for the subject of this expectation.