Package org.fest.assertions.core
Interface IndexedObjectEnumerableAssert<S extends IndexedObjectEnumerableAssert<S,T>,T>
-
- Type Parameters:
S
- the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.T
- the type of elements of the "actual" value.
- All Superinterfaces:
EnumerableAssert<S,T>
,ObjectEnumerableAssert<S,T>
- All Known Implementing Classes:
ListAssert
,ObjectArrayAssert
public interface IndexedObjectEnumerableAssert<S extends IndexedObjectEnumerableAssert<S,T>,T> extends ObjectEnumerableAssert<S,T>
Assertions methods applicable to indexed groups of objects (e.g. arrays or lists.)- Author:
- Alex Ruiz, Mikhail Mazursky
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description S
contains(T value, Index index)
Verifies that the actual group contains the given object at the given index.S
doesNotContain(T value, Index index)
Verifies that the actual group does not contain the given object at the given index.-
Methods inherited from interface org.fest.assertions.core.EnumerableAssert
hasSameSizeAs, hasSameSizeAs, hasSize, isEmpty, isNotEmpty, isNullOrEmpty, usingDefaultElementComparator, usingElementComparator
-
Methods inherited from interface org.fest.assertions.core.ObjectEnumerableAssert
are, areAtLeast, areAtMost, areExactly, areNot, areNotAtLeast, areNotAtMost, areNotExactly, contains, containsAll, containsExactly, containsNull, containsOnly, containsSequence, doesNotContain, doesNotContainNull, doesNotHaveDuplicates, doNotHave, doNotHaveAtLeast, doNotHaveAtMost, doNotHaveExactly, endsWith, have, haveAtLeast, haveAtMost, haveExactly, startsWith
-
-
-
-
Method Detail
-
contains
S contains(T value, Index index)
Verifies that the actual group contains the given object at the given index.- Parameters:
value
- the object to look for.index
- the index where the object should be stored in the actual group.- Returns:
- this assertion object.
- Throws:
java.lang.AssertionError
- if the actual group isnull
or empty.java.lang.NullPointerException
- if the givenIndex
isnull
.java.lang.IndexOutOfBoundsException
- if the value of the givenIndex
is equal to or greater than the size of the actual group.java.lang.AssertionError
- if the actual group does not contain the given object at the given index.
-
doesNotContain
S doesNotContain(T value, Index index)
Verifies that the actual group does not contain the given object at the given index.- Parameters:
value
- the object to look for.index
- the index where the object should be stored in the actual group.- Returns:
- this assertion object.
- Throws:
java.lang.AssertionError
- if the actual group isnull
.java.lang.NullPointerException
- if the givenIndex
isnull
.java.lang.AssertionError
- if the actual group contains the given object at the given index.
-
-