public class ListSubject<S extends ListSubject<S,T,C>,T,C extends List<T>> extends IterableSubject<S,T,C>
List
subjects.Subject.HasField
failureStrategy
Modifier and Type | Method and 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.
|
contains, containsAllIn, containsAllOf, containsAnyIn, containsAnyOf, containsExactly, containsExactlyElementsIn, containsNoDuplicates, containsNoneIn, containsNoneOf, containsOnlyElements, containsOnlyElementsIn, doesNotContain, hasSize, isEmpty, isNotEmpty, iteratesAs, iteratesAs, iteratesOverSequence
check, 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, named
public 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 © 2014. All rights reserved.