public class IterableKt
| Modifier and Type | Method and Description |
|---|---|
static <E,T extends Iterable<? extends E>> |
atLeast(Assert<? extends T> $receiver,
int times,
kotlin.jvm.functions.Function1<? super assertk.Assert<? extends E>,kotlin.Unit> f)
Asserts on each item in the iterable, passing if at least
times items pass.
The given lambda will be run for each item. |
static <E,T extends Iterable<? extends E>> |
atMost(Assert<? extends T> $receiver,
int times,
kotlin.jvm.functions.Function1<? super assertk.Assert<? extends E>,kotlin.Unit> f)
Asserts on each item in the iterable, passing if at most
times items pass.
The given lambda will be run for each item. |
static void |
contains(Assert<? extends java.lang.Iterable<?>> $receiver,
java.lang.Object element)
Asserts the iterable contains the expected element, using
in. |
static void |
doesNotContain(Assert<? extends java.lang.Iterable<?>> $receiver,
java.lang.Object element)
Asserts the iterable does not contain the expected element, using
!in. |
static <E> void |
each(Assert<? extends java.lang.Iterable<? extends E>> $receiver,
kotlin.jvm.functions.Function1<? super assertk.Assert<? extends E>,kotlin.Unit> f)
Asserts on each item in the iterable. The given lambda will be run for each item.
|
static <E,T extends Iterable<? extends E>> |
exactly(Assert<? extends T> $receiver,
int times,
kotlin.jvm.functions.Function1<? super assertk.Assert<? extends E>,kotlin.Unit> f)
Asserts on each item in the iterable, passing if exactly
times items pass.
The given lambda will be run for each item. |
static void |
isEmpty(Assert<? extends java.lang.Iterable<?>> $receiver)
Asserts the iterable is empty.
|
static void |
isNotEmpty(Assert<? extends java.lang.Iterable<?>> $receiver)
Asserts the iterable is not empty.
|
public static void contains(Assert<? extends java.lang.Iterable<?>> $receiver, java.lang.Object element)
Asserts the iterable contains the expected element, using in.
PrimativeArrayKt.byteArrayDoesNotContainpublic static void doesNotContain(Assert<? extends java.lang.Iterable<?>> $receiver, java.lang.Object element)
Asserts the iterable does not contain the expected element, using !in.
PrimativeArrayKt.byteArrayContainspublic static <E> void each(Assert<? extends java.lang.Iterable<? extends E>> $receiver, kotlin.jvm.functions.Function1<? super assertk.Assert<? extends E>,kotlin.Unit> f)
Asserts on each item in the iterable. The given lambda will be run for each item.
assertThat(listOf("one", "two")).each {
it.hasLength(3)
}
public static <E,T extends Iterable<? extends E>> void atLeast(Assert<? extends T> $receiver, int times, kotlin.jvm.functions.Function1<? super assertk.Assert<? extends E>,kotlin.Unit> f)
Asserts on each item in the iterable, passing if at least times items pass.
The given lambda will be run for each item.
assert(listOf(-1, 1, 2) as Iterable
public static <E,T extends Iterable<? extends E>> void atMost(Assert<? extends T> $receiver, int times, kotlin.jvm.functions.Function1<? super assertk.Assert<? extends E>,kotlin.Unit> f)
Asserts on each item in the iterable, passing if at most times items pass.
The given lambda will be run for each item.
assert(listOf(-2, -1, 1) as Iterable
public static <E,T extends Iterable<? extends E>> void exactly(Assert<? extends T> $receiver, int times, kotlin.jvm.functions.Function1<? super assertk.Assert<? extends E>,kotlin.Unit> f)
Asserts on each item in the iterable, passing if exactly times items pass.
The given lambda will be run for each item.
assert(listOf(-1, 1, 2) as Iterable
public static void isEmpty(Assert<? extends java.lang.Iterable<?>> $receiver)
Asserts the iterable is empty.
public static void isNotEmpty(Assert<? extends java.lang.Iterable<?>> $receiver)
Asserts the iterable is not empty.
PrimativeArrayKt.byteArrayIsEmpty