public class ListSubject<S extends ListSubject<S,T,C>,T,C extends List<T>> extends CollectionSubject<S,T,C>
List subjects.CollectionSubject.Has<T,C extends Collection<T>>Subject.HasFieldfailureStrategy| Modifier and Type | Method | Description |
|---|---|---|
void |
containsSequence(List<?> sequence) |
Fails if the list does not contain the specified sequence.
|
void |
isOrdered() |
Fails if the list is not strictly ordered according to the natural ordering of its elements.
|
void |
isOrdered(Comparator<T> comparator) |
Fails if the list is not strictly ordered according to the given comparator.
|
void |
isPartiallyOrdered() |
Fails if the list is not partially ordered according to the natural ordering of its elements.
|
void |
isPartiallyOrdered(Comparator<T> comparator) |
Fails if the list is not partially ordered according to the given comparator.
|
hascontains, containsAllIn, containsAllOf, containsAnyIn, containsAnyOf, containsExactly, containsExactlyElementsIn, containsNoDuplicates, containsNoneIn, containsNoneOf, containsOnlyElements, containsOnlyElementsIn, doesNotContain, hasSize, isEmpty, isNotEmpty, iteratesAs, iteratesAs, iteratesOverSequenceclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcheck, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hasField, hashCode, internalCustomName, is, isA, isEqualTo, isInstanceOf, isNotA, isNotEqualTo, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, labeled, namedpublic void containsSequence(List<?> sequence)
public void isOrdered()
ClassCastException - if any pair of elements is not mutually Comparable.NullPointerException - if any element is null.public void isPartiallyOrdered()
ClassCastException - if any pair of elements is not mutually Comparable.NullPointerException - if any element is null.public void isOrdered(Comparator<T> comparator)
ClassCastException - if any pair of elements is not mutually Comparable.NullPointerException - if any element is null.public void isPartiallyOrdered(Comparator<T> comparator)
ClassCastException - if any pair of elements is not mutually Comparable.NullPointerException - if any element is null.Copyright © 2019. All rights reserved.