public class ArrayKt
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
arrayContains(Assert<kotlin.Array[]> $receiver,
java.lang.Object element)
Asserts the array contains the expected element, using
in. |
static <T> void |
arrayContainsAll(Assert<kotlin.Array[]> $receiver,
java.lang.Object elements)
Asserts the array contains all the expected elements, in any order. The array may also contain
additional elements.
|
static <T> void |
arrayContainsExactly(Assert<kotlin.Array[]> $receiver,
java.lang.Object elements)
Asserts the array contains exactly the expected elements. They must be in the same order and
there must not be any extra elements.
|
static <T> void |
arrayDoesNotContain(Assert<kotlin.Array[]> $receiver,
java.lang.Object element)
Asserts the array does not contain the expected element, using
!in. |
static <T> void |
arrayEach(Assert<kotlin.Array[]> $receiver,
kotlin.jvm.functions.Function1<? super assertk.Assert<? extends T>,kotlin.Unit> f)
Asserts on each item in the array. The given lambda will be run for each item.
|
static <T> void |
arrayHasSameSizeAs(Assert<kotlin.Array[]> $receiver,
java.lang.Object[] other)
Asserts the array has the same size as the expected array.
|
static void |
arrayHasSize(Assert<? extends java.lang.Object[]> $receiver,
int size)
Asserts the array has the expected size.
|
static void |
arrayIsEmpty(Assert<? extends java.lang.Object[]> $receiver)
Asserts the array is empty.
|
static void |
arrayIsNotEmpty(Assert<? extends java.lang.Object[]> $receiver)
Asserts the array is not empty.
|
static void |
arrayIsNullOrEmpty(Assert<? extends java.lang.Object[]> $receiver)
Asserts the array is null or empty.
|
static <T> void |
containsNone(Assert<kotlin.Array[]> $receiver,
java.lang.Object elements)
Asserts the collection does not contain any of the expected elements.
|
static <T> void |
index(Assert<kotlin.Array[]> $receiver,
int index,
kotlin.jvm.functions.Function1<? super assertk.Assert<? extends T>,kotlin.Unit> f)
Deprecated.
|
static <T> Assert<T> |
index(Assert<kotlin.Array[]> $receiver,
int index)
Returns an assert that assertion on the value at the given index in the array.
|
static <T> void |
isEqualTo(Assert<kotlin.Array[]> $receiver,
T[] expected)
Asserts the array contents are equal to the expected one, using contentDeepEquals.
|
static <T> void |
isNotEqualTo(Assert<kotlin.Array[]> $receiver,
T[] expected)
Asserts the array contents are not equal to the expected one, using contentDeepEquals.
|
static Assert<java.lang.Integer> |
size(Assert<? extends java.lang.Object[]> $receiver)
Returns an assert on the Arrays's size.
|
public static Assert<java.lang.Integer> size(Assert<? extends java.lang.Object[]> $receiver)
Returns an assert on the Arrays's size.
public static <T> void isEqualTo(Assert<kotlin.Array[]> $receiver, T[] expected)
Asserts the array contents are equal to the expected one, using contentDeepEquals.
PrimativeArrayKt.isNotEqualTopublic static <T> void isNotEqualTo(Assert<kotlin.Array[]> $receiver, T[] expected)
Asserts the array contents are not equal to the expected one, using contentDeepEquals.
PrimativeArrayKt.isEqualTopublic static void arrayIsEmpty(Assert<? extends java.lang.Object[]> $receiver)
Asserts the array is empty.
public static void arrayIsNotEmpty(Assert<? extends java.lang.Object[]> $receiver)
Asserts the array is not empty.
PrimativeArrayKt.byteArrayIsEmptypublic static void arrayIsNullOrEmpty(Assert<? extends java.lang.Object[]> $receiver)
Asserts the array is null or empty.
PrimativeArrayKt.byteArrayIsEmptypublic static void arrayHasSize(Assert<? extends java.lang.Object[]> $receiver, int size)
Asserts the array has the expected size.
public static <T> void arrayHasSameSizeAs(Assert<kotlin.Array[]> $receiver, java.lang.Object[] other)
Asserts the array has the same size as the expected array.
public static <T> void arrayContains(Assert<kotlin.Array[]> $receiver, java.lang.Object element)
Asserts the array contains the expected element, using in.
PrimativeArrayKt.byteArrayDoesNotContainpublic static <T> void arrayDoesNotContain(Assert<kotlin.Array[]> $receiver, java.lang.Object element)
Asserts the array does not contain the expected element, using !in.
PrimativeArrayKt.byteArrayContainspublic static <T> void containsNone(Assert<kotlin.Array[]> $receiver, java.lang.Object elements)
Asserts the collection does not contain any of the expected elements.
PrimativeArrayKt.byteArrayContainsAllpublic static <T> void arrayContainsAll(Assert<kotlin.Array[]> $receiver, java.lang.Object elements)
Asserts the array contains all the expected elements, in any order. The array may also contain additional elements.
public static <T> void index(Assert<kotlin.Array[]> $receiver, int index, kotlin.jvm.functions.Function1<? super assertk.Assert<? extends T>,kotlin.Unit> f)
Returns an assert that assertion on the value at the given index in the array.
assertThat(arrayOf(0, 1, 2)).index(1) { it.isPositive() }
public static <T> Assert<T> index(Assert<kotlin.Array[]> $receiver, int index)
Returns an assert that assertion on the value at the given index in the array.
assertThat(arrayOf(0, 1, 2)).index(1).isPositive()
public static <T> void arrayContainsExactly(Assert<kotlin.Array[]> $receiver, java.lang.Object elements)
Asserts the array contains exactly the expected elements. They must be in the same order and there must not be any extra elements.
PrimativeArrayKt.byteArrayContainsAllpublic static <T> void arrayEach(Assert<kotlin.Array[]> $receiver, kotlin.jvm.functions.Function1<? super assertk.Assert<? extends T>,kotlin.Unit> f)
Asserts on each item in the array. The given lambda will be run for each item.
assertThat(arrayOf("one", "two")).each {
it.hasLength(3)
}