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

asList

infix fun <E> Expect<out Array<out E>>.asList(o: o): Expect<List<E>>

Turns Expect<Array<E>> into Expect<List<E>>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

infix fun <E> Expect<Array<E>>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<Array<E>>
@JvmName("byteArrAsList") infix fun Expect<ByteArray>.asList(assertionCreator: Expect<List<Byte>>.() -> Unit): Expect<ByteArray>
@JvmName("charArrAsList") infix fun Expect<CharArray>.asList(assertionCreator: Expect<List<Char>>.() -> Unit): Expect<CharArray>
@JvmName("shortArrAsList") infix fun Expect<ShortArray>.asList(assertionCreator: Expect<List<Short>>.() -> Unit): Expect<ShortArray>
@JvmName("intArrAsList") infix fun Expect<IntArray>.asList(assertionCreator: Expect<List<Int>>.() -> Unit): Expect<IntArray>
@JvmName("longArrAsList") infix fun Expect<LongArray>.asList(assertionCreator: Expect<List<Long>>.() -> Unit): Expect<LongArray>
@JvmName("floatArrAsList") infix fun Expect<FloatArray>.asList(assertionCreator: Expect<List<Float>>.() -> Unit): Expect<FloatArray>
@JvmName("doubleArrAsList") infix fun Expect<DoubleArray>.asList(assertionCreator: Expect<List<Double>>.() -> Unit): Expect<DoubleArray>
@JvmName("boolArrAsList") infix fun Expect<BooleanArray>.asList(assertionCreator: Expect<List<Boolean>>.() -> Unit): Expect<BooleanArray>

Expects that the subject of the assertion holds all assertions the given assertionCreator creates for the subject as List.

The transformation as such is not reflected in reporting. Use feature of({ f(it::asList) }, assertionCreator) if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

@JvmName("byteArrAsList") infix fun Expect<ByteArray>.asList(o: o): Expect<List<Byte>>

Turns Expect<CharArray> into Expect<List<Byte>>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

@JvmName("charArrAsList") infix fun Expect<CharArray>.asList(o: o): Expect<List<Char>>

Turns Expect<CharArray> into Expect<List<Char>>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

@JvmName("shortArrAsList") infix fun Expect<ShortArray>.asList(o: o): Expect<List<Short>>

Turns Expect<ShortArray> into Expect<List<Short>>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

@JvmName("intArrAsList") infix fun Expect<IntArray>.asList(o: o): Expect<List<Int>>

Turns Expect<IntArray> into Expect<List<Int>>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

@JvmName("longArrAsList") infix fun Expect<LongArray>.asList(o: o): Expect<List<Long>>

Turns Expect<LongArray> into Expect<List<Double>>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

@JvmName("floatArrAsList") infix fun Expect<FloatArray>.asList(o: o): Expect<List<Float>>

Turns Expect<FloatArray> into Expect<List<Float>>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

@JvmName("doubleArrAsList") infix fun Expect<DoubleArray>.asList(o: o): Expect<List<Double>>

Turns Expect<DoubleArray> into Expect<List<Double>>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

@JvmName("boolArrAsList") infix fun Expect<BooleanArray>.asList(o: o): Expect<List<Boolean>>

Turns Expect<BooleanArray> into Expect<List<Boolean>>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.12.0

infix fun <E, T : Iterable<E>> Expect<T>.asList(o: o): Expect<List<E>>

Turns Expect<E, T : Iterable<E>> into Expect<List<E>.

The transformation as such is not reflected in reporting. Use feature { f(it::asList) } if you want to show the transformation in reporting.

Return
The newly created Expect for the transformed subject.

Since
0.14.0

infix fun <E, T : Iterable<E>> Expect<T>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<T>

Expects that the subject of the assertion holds all assertions the given assertionCreator creates for the subject as List.

The transformation as such is not reflected in reporting. Use feature of({ f(it::asList) }, assertionCreator) if you want to show the transformation in reporting.

Return
An Expect for the current subject of the assertion.

Since
0.14.0