public class IterableSubject.UsingCorrespondence<A,E> extends Object
Iterable
under test) are compared to expected elements using a Correspondence
.
The expected elements are of type E
. Call methods on this object to actually execute
the proposition.Modifier and Type | Method and Description |
---|---|
void |
contains(E expected)
Attests that the subject contains at least one element that corresponds to the given expected
element.
|
Ordered |
containsAllIn(Iterable<? extends E> expected)
Attests that the subject contains elements that corresponds to all of the expected elements,
i.e.
|
Ordered |
containsAllOf(E first,
E second,
E... rest)
Attests that the subject contains elements that corresponds to all of the expected elements,
i.e.
|
void |
containsAnyIn(Iterable<? extends E> expected)
Attests that the subject contains at least one element that corresponds to at least one of
the expected elements.
|
void |
containsAnyOf(E first,
E second,
E... rest)
Attests that the subject contains at least one element that corresponds to at least one of
the expected elements.
|
Ordered |
containsExactly(E... expected)
Attests that subject contains exactly elements that correspond to the expected elements, i.e.
|
Ordered |
containsExactlyElementsIn(Iterable<? extends E> expected)
Attests that subject contains exactly elements that correspond to the expected elements, i.e.
|
void |
containsNoneIn(Iterable<? extends E> excluded)
Attests that the subject contains no elements that correspond to any of the given elements.
|
void |
containsNoneOf(E firstExcluded,
E secondExcluded,
E... restOfExcluded)
Attests that the subject contains no elements that correspond to any of the given elements.
|
void |
doesNotContain(E excluded)
Attests that none of the actual elements correspond to the given element.
|
public void contains(@Nullable E expected)
public void doesNotContain(@Nullable E excluded)
@SafeVarargs public final Ordered containsExactly(@Nullable E... expected)
To also test that the contents appear in the given order, make a call to inOrder()
on the object returned by this method.
public Ordered containsExactlyElementsIn(Iterable<? extends E> expected)
To also test that the contents appear in the given order, make a call to inOrder()
on the object returned by this method.
@SafeVarargs public final Ordered containsAllOf(@Nullable E first, @Nullable E second, @Nullable E... rest)
To also test that the contents appear in the given order, make a call to inOrder()
on the object returned by this method. The elements must appear in the given order within the
subject, but they are not required to be consecutive.
public Ordered containsAllIn(Iterable<? extends E> expected)
To also test that the contents appear in the given order, make a call to inOrder()
on the object returned by this method. The elements must appear in the given order within the
subject, but they are not required to be consecutive.
@SafeVarargs public final void containsAnyOf(@Nullable E first, @Nullable E second, @Nullable E... rest)
public void containsAnyIn(Iterable<? extends E> expected)
@SafeVarargs public final void containsNoneOf(@Nullable E firstExcluded, @Nullable E secondExcluded, @Nullable E... restOfExcluded)
Copyright © 2017. All rights reserved.