public class MatchersKt
| Modifier and Type | Method and Description |
|---|---|
static <T> Matcher<java.util.Collection> |
atLeastSize(int n) |
static <T> Matcher<java.util.Collection> |
atMostSize(int n) |
static <T,U> Matcher<java.util.Collection> |
beLargerThan(java.util.Collection<? extends U> other) |
static <T> Matcher<T> |
beOneOf(java.util.Collection<? extends T> collection)
Mather that verifies that this instance is in collection
|
static <T,U> Matcher<java.util.Collection> |
beSameSizeAs(java.util.Collection<? extends U> other) |
static <T,U> Matcher<java.util.Collection> |
beSmallerThan(java.util.Collection<? extends U> other) |
static <T> Matcher<java.util.List> |
beSortedWith(java.util.Comparator<? super T> comparator) |
static <T> Matcher<java.util.List> |
beSortedWith(kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp) |
static <T> Matcher<java.util.Collection> |
beUnique() |
static <T,C extends Collection<? extends T>> |
contain(T t) |
static <T> Matcher<java.util.Collection> |
containDuplicates() |
static <T> Matcher<java.util.Collection> |
containExactly(T expected) |
static <T,C extends Collection<? extends T>> |
containExactly(C expected)
Assert that a collection contains exactly the given values and nothing else, in order.
|
static <T> Matcher<java.util.Collection> |
containExactlyInAnyOrder(T expected) |
static <T,C extends Collection<? extends T>> |
containExactlyInAnyOrder(C expected)
Assert that a collection contains exactly the given values and nothing else, in any order.
|
static <T> Matcher<java.util.Collection> |
containNoNulls() |
static <T> Matcher<java.util.Collection> |
containNull() |
static <T> Matcher<java.util.Collection> |
containOnlyNulls() |
static <T> Matcher<java.util.List> |
endWith(java.util.Collection<? extends T> slice) |
static <T> Matcher<java.util.Collection> |
exist(kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> p) |
static <T,L extends List<? extends T>> |
haveElementAt(int index,
T element) |
static <T extends Comparable<? super T>,C extends Collection<? extends T>> |
haveLowerBound(T t) |
static <T extends Comparable<? super T>,C extends Collection<? extends T>> |
haveUpperBound(T t) |
static <T> void |
shouldBeEmpty(T[] $receiver) |
static <T> void |
shouldBeEmpty(java.util.Collection<? extends T> $receiver) |
static <T,U> void |
shouldBeLargerThan(T[] $receiver,
java.util.Collection<? extends U> other) |
static <T,U> void |
shouldBeLargerThan(T[] $receiver,
U[] other) |
static <T,U> void |
shouldBeLargerThan(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends U> other) |
static <T extends Comparable<? super T>> |
shouldBeMonotonicallyDecreasing(java.util.List<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldBeMonotonicallyDecreasing(T[] $receiver) |
static <T> void |
shouldBeMonotonicallyDecreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldBeMonotonicallyDecreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T extends Comparable<? super T>> |
shouldBeMonotonicallyIncreasing(java.util.List<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldBeMonotonicallyIncreasing(T[] $receiver) |
static <T> void |
shouldBeMonotonicallyIncreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldBeMonotonicallyIncreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldBeOneOf(T $receiver,
java.util.Collection<? extends T> collection)
Verifies that this instance is in collection
|
static <T> void |
shouldBeOneOf(T $receiver,
T any)
Verifies that this instance is any of any
|
static <T,U> void |
shouldBeSameSizeAs(T[] $receiver,
java.util.Collection<? extends U> other) |
static <T,U> void |
shouldBeSameSizeAs(T[] $receiver,
U[] other) |
static <T,U> void |
shouldBeSameSizeAs(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends U> other) |
static <T> void |
shouldBeSingleton(java.util.Collection<? extends T> $receiver)
Verifies this collection contains only one element
|
static <T> void |
shouldBeSingleton(T[] $receiver) |
static <T,U> void |
shouldBeSmallerThan(T[] $receiver,
java.util.Collection<? extends U> other) |
static <T,U> void |
shouldBeSmallerThan(T[] $receiver,
U[] other) |
static <T,U> void |
shouldBeSmallerThan(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends U> other) |
static <T extends Comparable<? super T>> |
shouldBeSorted(java.util.List<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldBeSorted(T[] $receiver) |
static <T> void |
shouldBeSortedWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldBeSortedWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldBeSortedWith(T[] $receiver,
kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp) |
static <T> void |
shouldBeSortedWith(java.util.List<? extends T> $receiver,
kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp) |
static <T extends Comparable<? super T>> |
shouldBeStrictlyDecreasing(java.util.List<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldBeStrictlyDecreasing(T[] $receiver) |
static <T> void |
shouldBeStrictlyDecreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldBeStrictlyDecreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T extends Comparable<? super T>> |
shouldBeStrictlyIncreasing(java.util.List<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldBeStrictlyIncreasing(T[] $receiver) |
static <T> void |
shouldBeStrictlyIncreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldBeStrictlyIncreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldBeUnique(T[] $receiver) |
static <T> void |
shouldBeUnique(java.util.Collection<? extends T> $receiver) |
static <T,C extends Collection<? extends T>> |
shouldContain(C $receiver,
T t) |
static <T> void |
shouldContainAll(T[] $receiver,
T ts) |
static <T> void |
shouldContainAll(java.util.Collection<? extends T> $receiver,
T ts) |
static <T> void |
shouldContainAll(T[] $receiver,
java.util.Collection<? extends T> ts) |
static <T> void |
shouldContainAll(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends T> ts) |
static <T> void |
shouldContainDuplicates(T[] $receiver) |
static <T> void |
shouldContainDuplicates(java.util.Collection<? extends T> $receiver) |
static <T> void |
shouldContainExactly(T[] $receiver,
T[] expected) |
static <T,C extends Collection<? extends T>> |
shouldContainExactly(C $receiver,
C expected) |
static <T,C extends Collection<? extends T>> |
shouldContainExactly(C $receiver,
T expected) |
static <T> void |
shouldContainExactlyInAnyOrder(T[] $receiver,
T[] expected) |
static <T,C extends Collection<? extends T>> |
shouldContainExactlyInAnyOrder(C $receiver,
C expected) |
static <T,C extends Collection<? extends T>> |
shouldContainExactlyInAnyOrder(C $receiver,
T expected) |
static <T> void |
shouldContainInOrder(T[] $receiver,
T ts) |
static <T> void |
shouldContainInOrder(java.util.List<? extends T> $receiver,
T ts) |
static <T> void |
shouldContainInOrder(T[] $receiver,
java.util.List<? extends T> expected) |
static <T> void |
shouldContainInOrder(java.util.List<? extends T> $receiver,
java.util.List<? extends T> expected) |
static <T> void |
shouldContainNoNulls(T[] $receiver) |
static <T> void |
shouldContainNoNulls(java.util.Collection<? extends T> $receiver) |
static <T> void |
shouldContainNull(T[] $receiver) |
static <T> void |
shouldContainNull(java.util.Collection<? extends T> $receiver) |
static <T> void |
shouldContainOnlyNulls(T[] $receiver) |
static <T> void |
shouldContainOnlyNulls(java.util.Collection<? extends T> $receiver) |
static <T> void |
shouldEndWith(T[] $receiver,
java.util.Collection<? extends T> slice) |
static <T> void |
shouldEndWith(T[] $receiver,
T[] slice) |
static <T> void |
shouldEndWith(java.util.List<? extends T> $receiver,
java.util.Collection<? extends T> slice) |
static <T> void |
shouldExist(T[] $receiver,
kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> p) |
static <T> void |
shouldExist(java.util.Collection<? extends T> $receiver,
kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> p) |
static <T> void |
shouldHaveAtLeastSize(T[] $receiver,
int n) |
static <T> void |
shouldHaveAtLeastSize(java.util.Collection<? extends T> $receiver,
int n) |
static <T> void |
shouldHaveAtMostSize(T[] $receiver,
int n) |
static <T> void |
shouldHaveAtMostSize(java.util.Collection<? extends T> $receiver,
int n) |
static <T> void |
shouldHaveElementAt(T[] $receiver,
int index,
T element) |
static <T> void |
shouldHaveElementAt(java.util.List<? extends T> $receiver,
int index,
T element) |
static <T extends Comparable<? super T>> |
shouldHaveLowerBound(T[] $receiver,
T t) |
static <T extends Comparable<? super T>,C extends Collection<? extends T>> |
shouldHaveLowerBound(C $receiver,
T t) |
static <T> void |
shouldHaveSingleElement(T[] $receiver,
T t) |
static <T> void |
shouldHaveSingleElement(java.util.Collection<? extends T> $receiver,
T t) |
static <T> void |
shouldHaveSize(T[] $receiver,
int size) |
static <T> void |
shouldHaveSize(java.util.Collection<? extends T> $receiver,
int size) |
static <T extends Comparable<? super T>> |
shouldHaveUpperBound(T[] $receiver,
T t) |
static <T extends Comparable<? super T>,C extends Collection<? extends T>> |
shouldHaveUpperBound(C $receiver,
T t) |
static <T> void |
shouldNotBeEmpty(T[] $receiver) |
static <T> void |
shouldNotBeEmpty(java.util.Collection<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldNotBeMonotonicallyDecreasing(java.util.List<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldNotBeMonotonicallyDecreasing(T[] $receiver) |
static <T> void |
shouldNotBeMonotonicallyDecreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldNotBeMonotonicallyDecreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T extends Comparable<? super T>> |
shouldNotBeMonotonicallyIncreasing(java.util.List<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldNotBeMonotonicallyIncreasing(T[] $receiver) |
static <T> void |
shouldNotBeMonotonicallyIncreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldNotBeMonotonicallyIncreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldNotBeOneOf(T $receiver,
java.util.Collection<? extends T> collection)
Verifies that this instance is NOT in collection
|
static <T> void |
shouldNotBeOneOf(T $receiver,
T any)
Verifies that this instance is NOT any of any
|
static <T> void |
shouldNotBeSingleton(java.util.Collection<? extends T> $receiver)
Verifies this collection doesn't contain only one element
|
static <T> void |
shouldNotBeSingleton(T[] $receiver) |
static <T extends Comparable<? super T>> |
shouldNotBeSorted(T[] $receiver) |
static <T extends Comparable<? super T>> |
shouldNotBeSorted(java.util.List<? extends T> $receiver) |
static <T> void |
shouldNotBeSortedWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldNotBeSortedWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldNotBeSortedWith(T[] $receiver,
kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp) |
static <T> void |
shouldNotBeSortedWith(java.util.List<? extends T> $receiver,
kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp) |
static <T extends Comparable<? super T>> |
shouldNotBeStrictlyDecreasing(java.util.List<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldNotBeStrictlyDecreasing(T[] $receiver) |
static <T> void |
shouldNotBeStrictlyDecreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldNotBeStrictlyDecreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T extends Comparable<? super T>> |
shouldNotBeStrictlyIncreasing(java.util.List<? extends T> $receiver) |
static <T extends Comparable<? super T>> |
shouldNotBeStrictlyIncreasing(T[] $receiver) |
static <T> void |
shouldNotBeStrictlyIncreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldNotBeStrictlyIncreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator) |
static <T> void |
shouldNotBeUnique(T[] $receiver) |
static <T> void |
shouldNotBeUnique(java.util.Collection<? extends T> $receiver) |
static <T,C extends Collection<? extends T>> |
shouldNotContain(C $receiver,
T t) |
static <T> void |
shouldNotContainAll(T[] $receiver,
T ts) |
static <T> void |
shouldNotContainAll(java.util.Collection<? extends T> $receiver,
T ts) |
static <T> void |
shouldNotContainAll(T[] $receiver,
java.util.Collection<? extends T> ts) |
static <T> void |
shouldNotContainAll(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends T> ts) |
static <T> void |
shouldNotContainDuplicates(T[] $receiver) |
static <T> void |
shouldNotContainDuplicates(java.util.Collection<? extends T> $receiver) |
static <T> void |
shouldNotContainExactly(T[] $receiver,
T[] expected) |
static <T,C extends Collection<? extends T>> |
shouldNotContainExactly(C $receiver,
C expected) |
static <T,C extends Collection<? extends T>> |
shouldNotContainExactly(C $receiver,
T expected) |
static <T> void |
shouldNotContainExactlyInAnyOrder(T[] $receiver,
T[] expected) |
static <T,C extends Collection<? extends T>> |
shouldNotContainExactlyInAnyOrder(C $receiver,
C expected) |
static <T,C extends Collection<? extends T>> |
shouldNotContainExactlyInAnyOrder(C $receiver,
T expected) |
static <T> void |
shouldNotContainInOrder(T[] $receiver,
T[] expected) |
static <T> void |
shouldNotContainInOrder(T[] $receiver,
java.util.List<? extends T> expected) |
static <T> void |
shouldNotContainInOrder(java.util.List<? extends T> $receiver,
java.util.List<? extends T> expected) |
static <T> void |
shouldNotContainNoNulls(T[] $receiver) |
static <T> void |
shouldNotContainNoNulls(java.util.Collection<? extends T> $receiver) |
static <T> void |
shouldNotContainNull(T[] $receiver) |
static <T> void |
shouldNotContainNull(java.util.Collection<? extends T> $receiver) |
static <T> void |
shouldNotContainOnlyNulls(T[] $receiver) |
static <T> void |
shouldNotContainOnlyNulls(java.util.Collection<? extends T> $receiver) |
static <T> void |
shouldNotEndWith(T[] $receiver,
java.util.Collection<? extends T> slice) |
static <T> void |
shouldNotEndWith(T[] $receiver,
T[] slice) |
static <T> void |
shouldNotEndWith(java.util.List<? extends T> $receiver,
java.util.Collection<? extends T> slice) |
static <T> void |
shouldNotHaveElementAt(T[] $receiver,
int index,
T element) |
static <T> void |
shouldNotHaveElementAt(java.util.List<? extends T> $receiver,
int index,
T element) |
static <T> void |
shouldNotHaveSingleElement(T[] $receiver,
T t) |
static <T> void |
shouldNotHaveSingleElement(java.util.Collection<? extends T> $receiver,
T t) |
static <T> void |
shouldNotHaveSize(T[] $receiver,
int size) |
static <T> void |
shouldNotHaveSize(java.util.Collection<? extends T> $receiver,
int size) |
static <T> void |
shouldNotStartWith(T[] $receiver,
java.util.Collection<? extends T> slice) |
static <T> void |
shouldNotStartWith(T[] $receiver,
T[] slice) |
static <T> void |
shouldNotStartWith(java.util.List<? extends T> $receiver,
java.util.Collection<? extends T> slice) |
static <T> void |
shouldStartWith(T[] $receiver,
java.util.Collection<? extends T> slice) |
static <T> void |
shouldStartWith(T[] $receiver,
T[] slice) |
static <T> void |
shouldStartWith(java.util.List<? extends T> $receiver,
java.util.Collection<? extends T> slice) |
static <T> Matcher<java.util.List> |
sortedWith(java.util.Comparator<? super T> comparator) |
static <T> Matcher<java.util.List> |
sortedWith(kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp) |
static <T> Matcher<java.util.List> |
startWith(java.util.Collection<? extends T> slice) |
public static <T> void shouldContainOnlyNulls(T[] $receiver)
public static <T> void shouldContainOnlyNulls(java.util.Collection<? extends T> $receiver)
public static <T> void shouldNotContainOnlyNulls(T[] $receiver)
public static <T> void shouldNotContainOnlyNulls(java.util.Collection<? extends T> $receiver)
public static <T> Matcher<java.util.Collection> containOnlyNulls()
public static <T> void shouldContainNull(T[] $receiver)
public static <T> void shouldContainNull(java.util.Collection<? extends T> $receiver)
public static <T> void shouldNotContainNull(T[] $receiver)
public static <T> void shouldNotContainNull(java.util.Collection<? extends T> $receiver)
public static <T> Matcher<java.util.Collection> containNull()
public static <T> void shouldStartWith(T[] $receiver,
java.util.Collection<? extends T> slice)
public static <T> void shouldStartWith(T[] $receiver,
T[] slice)
public static <T> void shouldStartWith(java.util.List<? extends T> $receiver,
java.util.Collection<? extends T> slice)
public static <T> void shouldNotStartWith(T[] $receiver,
java.util.Collection<? extends T> slice)
public static <T> void shouldNotStartWith(T[] $receiver,
T[] slice)
public static <T> void shouldNotStartWith(java.util.List<? extends T> $receiver,
java.util.Collection<? extends T> slice)
public static <T> Matcher<java.util.List> startWith(java.util.Collection<? extends T> slice)
public static <T> void shouldEndWith(T[] $receiver,
java.util.Collection<? extends T> slice)
public static <T> void shouldEndWith(T[] $receiver,
T[] slice)
public static <T> void shouldEndWith(java.util.List<? extends T> $receiver,
java.util.Collection<? extends T> slice)
public static <T> void shouldNotEndWith(T[] $receiver,
java.util.Collection<? extends T> slice)
public static <T> void shouldNotEndWith(T[] $receiver,
T[] slice)
public static <T> void shouldNotEndWith(java.util.List<? extends T> $receiver,
java.util.Collection<? extends T> slice)
public static <T> Matcher<java.util.List> endWith(java.util.Collection<? extends T> slice)
public static <T> void shouldHaveElementAt(T[] $receiver,
int index,
T element)
public static <T> void shouldHaveElementAt(java.util.List<? extends T> $receiver,
int index,
T element)
public static <T> void shouldNotHaveElementAt(T[] $receiver,
int index,
T element)
public static <T> void shouldNotHaveElementAt(java.util.List<? extends T> $receiver,
int index,
T element)
public static <T,L extends List<? extends T>> Matcher<L> haveElementAt(int index, T element)
public static <T> void shouldContainNoNulls(T[] $receiver)
public static <T> void shouldContainNoNulls(java.util.Collection<? extends T> $receiver)
public static <T> void shouldNotContainNoNulls(T[] $receiver)
public static <T> void shouldNotContainNoNulls(java.util.Collection<? extends T> $receiver)
public static <T> Matcher<java.util.Collection> containNoNulls()
public static <T,C extends Collection<? extends T>> void shouldContain(C $receiver, T t)
public static <T,C extends Collection<? extends T>> void shouldNotContain(C $receiver, T t)
public static <T,C extends Collection<? extends T>> Matcher<C> contain(T t)
public static <T> void shouldNotContainExactly(T[] $receiver,
T[] expected)
public static <T,C extends Collection<? extends T>> void shouldNotContainExactly(C $receiver, C expected)
public static <T,C extends Collection<? extends T>> void shouldNotContainExactly(C $receiver, T expected)
public static <T> void shouldContainExactly(T[] $receiver,
T[] expected)
public static <T,C extends Collection<? extends T>> void shouldContainExactly(C $receiver, C expected)
public static <T,C extends Collection<? extends T>> void shouldContainExactly(C $receiver, T expected)
public static <T> Matcher<java.util.Collection> containExactly(T expected)
public static <T,C extends Collection<? extends T>> Matcher<C> containExactly(C expected)
Assert that a collection contains exactly the given values and nothing else, in order.
public static <T> void shouldNotContainExactlyInAnyOrder(T[] $receiver,
T[] expected)
public static <T,C extends Collection<? extends T>> void shouldNotContainExactlyInAnyOrder(C $receiver, C expected)
public static <T,C extends Collection<? extends T>> void shouldNotContainExactlyInAnyOrder(C $receiver, T expected)
public static <T> void shouldContainExactlyInAnyOrder(T[] $receiver,
T[] expected)
public static <T,C extends Collection<? extends T>> void shouldContainExactlyInAnyOrder(C $receiver, C expected)
public static <T,C extends Collection<? extends T>> void shouldContainExactlyInAnyOrder(C $receiver, T expected)
public static <T> Matcher<java.util.Collection> containExactlyInAnyOrder(T expected)
public static <T,C extends Collection<? extends T>> Matcher<C> containExactlyInAnyOrder(C expected)
Assert that a collection contains exactly the given values and nothing else, in any order.
public static <T extends Comparable<? super T>> void shouldHaveUpperBound(T[] $receiver, T t)
public static <T extends Comparable<? super T>,C extends Collection<? extends T>> void shouldHaveUpperBound(C $receiver, T t)
public static <T extends Comparable<? super T>,C extends Collection<? extends T>> Matcher<C> haveUpperBound(T t)
public static <T extends Comparable<? super T>> void shouldHaveLowerBound(T[] $receiver, T t)
public static <T extends Comparable<? super T>,C extends Collection<? extends T>> void shouldHaveLowerBound(C $receiver, T t)
public static <T extends Comparable<? super T>,C extends Collection<? extends T>> Matcher<C> haveLowerBound(T t)
public static <T> void shouldBeUnique(T[] $receiver)
public static <T> void shouldBeUnique(java.util.Collection<? extends T> $receiver)
public static <T> void shouldNotBeUnique(T[] $receiver)
public static <T> void shouldNotBeUnique(java.util.Collection<? extends T> $receiver)
public static <T> Matcher<java.util.Collection> beUnique()
public static <T> void shouldContainDuplicates(T[] $receiver)
public static <T> void shouldContainDuplicates(java.util.Collection<? extends T> $receiver)
public static <T> void shouldNotContainDuplicates(T[] $receiver)
public static <T> void shouldNotContainDuplicates(java.util.Collection<? extends T> $receiver)
public static <T> Matcher<java.util.Collection> containDuplicates()
public static <T> Matcher<java.util.List> beSortedWith(java.util.Comparator<? super T> comparator)
public static <T> Matcher<java.util.List> beSortedWith(kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp)
public static <T> Matcher<java.util.List> sortedWith(java.util.Comparator<? super T> comparator)
public static <T> Matcher<java.util.List> sortedWith(kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp)
public static <T extends Comparable<? super T>> void shouldBeSorted(java.util.List<? extends T> $receiver)
public static <T extends Comparable<? super T>> void shouldBeSorted(T[] $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeSorted(T[] $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeSorted(java.util.List<? extends T> $receiver)
public static <T> void shouldBeSortedWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldBeSortedWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeSortedWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeSortedWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldBeSortedWith(T[] $receiver,
kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp)
public static <T> void shouldBeSortedWith(java.util.List<? extends T> $receiver,
kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp)
public static <T> void shouldNotBeSortedWith(T[] $receiver,
kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp)
public static <T> void shouldNotBeSortedWith(java.util.List<? extends T> $receiver,
kotlin.jvm.functions.Function2<? super T,? super T,java.lang.Integer> cmp)
public static <T extends Comparable<? super T>> void shouldBeMonotonicallyIncreasing(java.util.List<? extends T> $receiver)
public static <T extends Comparable<? super T>> void shouldBeMonotonicallyIncreasing(T[] $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeMonotonicallyIncreasing(java.util.List<? extends T> $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeMonotonicallyIncreasing(T[] $receiver)
public static <T> void shouldBeMonotonicallyIncreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldBeMonotonicallyIncreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeMonotonicallyIncreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeMonotonicallyIncreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T extends Comparable<? super T>> void shouldBeMonotonicallyDecreasing(java.util.List<? extends T> $receiver)
public static <T extends Comparable<? super T>> void shouldBeMonotonicallyDecreasing(T[] $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeMonotonicallyDecreasing(java.util.List<? extends T> $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeMonotonicallyDecreasing(T[] $receiver)
public static <T> void shouldBeMonotonicallyDecreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldBeMonotonicallyDecreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeMonotonicallyDecreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeMonotonicallyDecreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T extends Comparable<? super T>> void shouldBeStrictlyIncreasing(java.util.List<? extends T> $receiver)
public static <T extends Comparable<? super T>> void shouldBeStrictlyIncreasing(T[] $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeStrictlyIncreasing(java.util.List<? extends T> $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeStrictlyIncreasing(T[] $receiver)
public static <T> void shouldBeStrictlyIncreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldBeStrictlyIncreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeStrictlyIncreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeStrictlyIncreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T extends Comparable<? super T>> void shouldBeStrictlyDecreasing(java.util.List<? extends T> $receiver)
public static <T extends Comparable<? super T>> void shouldBeStrictlyDecreasing(T[] $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeStrictlyDecreasing(java.util.List<? extends T> $receiver)
public static <T extends Comparable<? super T>> void shouldNotBeStrictlyDecreasing(T[] $receiver)
public static <T> void shouldBeStrictlyDecreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldBeStrictlyDecreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeStrictlyDecreasingWith(java.util.List<? extends T> $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldNotBeStrictlyDecreasingWith(T[] $receiver,
java.util.Comparator<? super T> comparator)
public static <T> void shouldHaveSingleElement(T[] $receiver,
T t)
public static <T> void shouldHaveSingleElement(java.util.Collection<? extends T> $receiver,
T t)
public static <T> void shouldNotHaveSingleElement(T[] $receiver,
T t)
public static <T> void shouldNotHaveSingleElement(java.util.Collection<? extends T> $receiver,
T t)
public static <T> void shouldHaveSize(T[] $receiver,
int size)
public static <T> void shouldHaveSize(java.util.Collection<? extends T> $receiver,
int size)
public static <T> void shouldNotHaveSize(T[] $receiver,
int size)
public static <T> void shouldNotHaveSize(java.util.Collection<? extends T> $receiver,
int size)
public static <T> void shouldBeSingleton(java.util.Collection<? extends T> $receiver)
Verifies this collection contains only one element
This assertion is an alias to collection shouldHaveSize 1. This will pass if the collection have exactly one element
(definition of a Singleton Collection)
listOf(1).shouldBeSingleton() // Assertion passes
listOf(1, 2).shouldBeSingleton() // Assertion fails
public static <T> void shouldBeSingleton(T[] $receiver)
public static <T> void shouldNotBeSingleton(java.util.Collection<? extends T> $receiver)
Verifies this collection doesn't contain only one element
This assertion is an alias to collection shouldNotHaveSize 1. This will pass if the collection doesn't have exactly one element
(definition of a Singleton Collection)
listOf(1, 2).shouldNotBeSingleton() // Assertion passes
listOf().shouldNotBeSingleton() // Assertion passes
listOf(1).shouldNotBeSingleton() // Assertion fails
public static <T> void shouldNotBeSingleton(T[] $receiver)
public static <T,U> void shouldBeLargerThan(T[] $receiver,
java.util.Collection<? extends U> other)
public static <T,U> void shouldBeLargerThan(T[] $receiver,
U[] other)
public static <T,U> void shouldBeLargerThan(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends U> other)
public static <T,U> Matcher<java.util.Collection> beLargerThan(java.util.Collection<? extends U> other)
public static <T,U> void shouldBeSmallerThan(T[] $receiver,
java.util.Collection<? extends U> other)
public static <T,U> void shouldBeSmallerThan(T[] $receiver,
U[] other)
public static <T,U> void shouldBeSmallerThan(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends U> other)
public static <T,U> Matcher<java.util.Collection> beSmallerThan(java.util.Collection<? extends U> other)
public static <T,U> void shouldBeSameSizeAs(T[] $receiver,
java.util.Collection<? extends U> other)
public static <T,U> void shouldBeSameSizeAs(T[] $receiver,
U[] other)
public static <T,U> void shouldBeSameSizeAs(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends U> other)
public static <T,U> Matcher<java.util.Collection> beSameSizeAs(java.util.Collection<? extends U> other)
public static <T> void shouldHaveAtLeastSize(T[] $receiver,
int n)
public static <T> void shouldHaveAtLeastSize(java.util.Collection<? extends T> $receiver,
int n)
public static <T> Matcher<java.util.Collection> atLeastSize(int n)
public static <T> void shouldHaveAtMostSize(T[] $receiver,
int n)
public static <T> void shouldHaveAtMostSize(java.util.Collection<? extends T> $receiver,
int n)
public static <T> Matcher<java.util.Collection> atMostSize(int n)
public static <T> void shouldExist(T[] $receiver,
kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> p)
public static <T> void shouldExist(java.util.Collection<? extends T> $receiver,
kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> p)
public static <T> Matcher<java.util.Collection> exist(kotlin.jvm.functions.Function1<? super T,java.lang.Boolean> p)
public static <T> void shouldContainInOrder(T[] $receiver,
T ts)
public static <T> void shouldContainInOrder(java.util.List<? extends T> $receiver,
T ts)
public static <T> void shouldContainInOrder(T[] $receiver,
java.util.List<? extends T> expected)
public static <T> void shouldContainInOrder(java.util.List<? extends T> $receiver,
java.util.List<? extends T> expected)
public static <T> void shouldNotContainInOrder(T[] $receiver,
T[] expected)
public static <T> void shouldNotContainInOrder(T[] $receiver,
java.util.List<? extends T> expected)
public static <T> void shouldNotContainInOrder(java.util.List<? extends T> $receiver,
java.util.List<? extends T> expected)
public static <T> void shouldBeEmpty(T[] $receiver)
public static <T> void shouldBeEmpty(java.util.Collection<? extends T> $receiver)
public static <T> void shouldNotBeEmpty(T[] $receiver)
public static <T> void shouldNotBeEmpty(java.util.Collection<? extends T> $receiver)
public static <T> void shouldContainAll(T[] $receiver,
T ts)
public static <T> void shouldContainAll(java.util.Collection<? extends T> $receiver,
T ts)
public static <T> void shouldNotContainAll(T[] $receiver,
T ts)
public static <T> void shouldNotContainAll(java.util.Collection<? extends T> $receiver,
T ts)
public static <T> void shouldContainAll(T[] $receiver,
java.util.Collection<? extends T> ts)
public static <T> void shouldContainAll(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends T> ts)
public static <T> void shouldNotContainAll(T[] $receiver,
java.util.Collection<? extends T> ts)
public static <T> void shouldNotContainAll(java.util.Collection<? extends T> $receiver,
java.util.Collection<? extends T> ts)
public static <T> void shouldBeOneOf(T $receiver,
java.util.Collection<? extends T> collection)
Verifies that this instance is in collection
Assertion to check that this instance is in collection. This assertion checks by reference, and not by value, therefore the exact instance must be in collection, or this will fail.
An empty collection will always fail. If you need to check for empty collection, use MatchersKt.shouldBeEmpty
public static <T> void shouldNotBeOneOf(T $receiver,
java.util.Collection<? extends T> collection)
Verifies that this instance is NOT in collection
Assertion to check that this instance is not in collection. This assertion checks by reference, and not by value, therefore the exact instance must not be in collection, or this will fail.
An empty collection will always fail. If you need to check for empty collection, use MatchersKt.shouldBeEmpty
public static <T> void shouldBeOneOf(T $receiver,
T any)
Verifies that this instance is any of any
Assertion to check that this instance is any of any. This assertion checks by reference, and not by value, therefore the exact instance must be in any, or this will fail.
An empty collection will always fail. If you need to check for empty collection, use MatchersKt.shouldBeEmpty
public static <T> void shouldNotBeOneOf(T $receiver,
T any)
Verifies that this instance is NOT any of any
Assertion to check that this instance is not any of any. This assertion checks by reference, and not by value, therefore the exact instance must not be in any, or this will fail.
An empty collection will always fail. If you need to check for empty collection, use MatchersKt.shouldBeEmpty
public static <T> Matcher<T> beOneOf(java.util.Collection<? extends T> collection)
Mather that verifies that this instance is in collection
Assertion to check that this instance is in collection. This matcher checks by reference, and not by value, therefore the exact instance must be in collection, or this will fail.
An empty collection will always fail. If you need to check for empty collection, use MatchersKt.shouldBeEmpty