Class AbstractListAssert<T,U extends java.util.List<? extends T>,V extends GenericListAssert<T,U,V>>
- java.lang.Object
-
- io.github.henryssondaniel.teacup.core.assertion.AbstractObjectAssert<T,U>
-
- io.github.henryssondaniel.teacup.core.assertion.AbstractIterableAssert<T,U,V>
-
- io.github.henryssondaniel.teacup.core.assertion.AbstractListAssert<T,U,V>
-
- Type Parameters:
T
- the typeU
- the list typeV
- the generic list assert type
- All Implemented Interfaces:
EnumerableAssert<U,V>
,GenericIterableAssert<T,U,V>
,GenericListAssert<T,U,V>
,GenericObjectAssert<U,V>
public abstract class AbstractListAssert<T,U extends java.util.List<? extends T>,V extends GenericListAssert<T,U,V>> extends AbstractIterableAssert<T,U,V> implements GenericListAssert<T,U,V>
Abstract list assert.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description AbstractListAssert()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
contains(T value, int index)
Verifies that the List contains the given value at the given index.V
doesNotContain(T value, int index)
Verifies that the List does not contain the given value at the given index.U
hasSameSizeAs(java.lang.Iterable<?> other)
Verifies that the enumerable has the same size as the other.U
hasSameSizeAs(java.lang.Object array)
Verifies that the enumerable has the same size as the array.U
hasSize(int expected)
Verifies that the enumerable has the expected size.U
isEmpty()
Verifies that the enumerable is empty.U
isNotEmpty()
Verifies that the enumerable is not empty.U
isNullOrEmpty()
Verifies that the enumerable is null or empty.-
Methods inherited from class io.github.henryssondaniel.teacup.core.assertion.AbstractIterableAssert
contains, containsAll, containsAnyElementsOf, containsAnyOf, containsExactly, containsExactlyElementsOf, containsExactlyInAnyOrder, containsExactlyInAnyOrderElementsOf, containsNull, containsOnly, containsOnlyNulls, containsOnlyOnce, containsSequence, containsSequence, containsSubsequence, containsSubsequence, doesNotContain, doesNotContainAnyElementsOf, doesNotContainNull, doesNotContainSequence, doesNotContainSequence, doesNotContainSubsequence, doesNotContainSubsequence, doesNotHaveAnyElementsOfTypes, doesNotHaveDuplicates, endsWith, hasAtLeastOneElementOfType, hasOnlyElementsOfType, hasOnlyElementsOfTypes, hasSameElementsAs, isSubsetOf, isSubsetOf, startsWith
-
Methods inherited from class io.github.henryssondaniel.teacup.core.assertion.AbstractObjectAssert
doesNotHaveSameClassAs, hasSameClassAs, isEqualTo, isNotEqualTo, isNotSameAs, isSameAs, verify
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.henryssondaniel.teacup.core.assertion.EnumerableAssert
hasSameSizeAs, hasSameSizeAs, hasSize, isEmpty, isNotEmpty, isNullOrEmpty
-
Methods inherited from interface io.github.henryssondaniel.teacup.core.assertion.GenericIterableAssert
contains, containsAll, containsAnyElementsOf, containsAnyOf, containsExactly, containsExactlyElementsOf, containsExactlyInAnyOrder, containsExactlyInAnyOrderElementsOf, containsNull, containsOnly, containsOnlyNulls, containsOnlyOnce, containsSequence, containsSequence, containsSubsequence, containsSubsequence, doesNotContain, doesNotContainAnyElementsOf, doesNotContainNull, doesNotContainSequence, doesNotContainSequence, doesNotContainSubsequence, doesNotContainSubsequence, doesNotHaveAnyElementsOfTypes, doesNotHaveDuplicates, endsWith, hasAtLeastOneElementOfType, hasOnlyElementsOfType, hasOnlyElementsOfTypes, hasSameElementsAs, isSubsetOf, isSubsetOf, startsWith
-
Methods inherited from interface io.github.henryssondaniel.teacup.core.assertion.GenericObjectAssert
doesNotHaveSameClassAs, hasSameClassAs, isEqualTo, isNotEqualTo, isNotSameAs, isSameAs, verify
-
-
-
-
Method Detail
-
contains
public V contains(T value, int index)
Description copied from interface:GenericListAssert
Verifies that the List contains the given value at the given index.- Specified by:
contains
in interfaceGenericListAssert<T,U extends java.util.List<? extends T>,V extends GenericListAssert<T,U,V>>
- Parameters:
value
- the valueindex
- the index- Returns:
- the list assert
-
doesNotContain
public V doesNotContain(T value, int index)
Description copied from interface:GenericListAssert
Verifies that the List does not contain the given value at the given index.- Specified by:
doesNotContain
in interfaceGenericListAssert<T,U extends java.util.List<? extends T>,V extends GenericListAssert<T,U,V>>
- Parameters:
value
- the valueindex
- the index- Returns:
- the list assert
-
hasSameSizeAs
public U hasSameSizeAs(java.lang.Iterable<?> other)
Description copied from interface:EnumerableAssert
Verifies that the enumerable has the same size as the other.- Specified by:
hasSameSizeAs
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Parameters:
other
- the other- Returns:
- the enumerable assert
-
hasSameSizeAs
public U hasSameSizeAs(java.lang.Object array)
Description copied from interface:EnumerableAssert
Verifies that the enumerable has the same size as the array.- Specified by:
hasSameSizeAs
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Parameters:
array
- the other- Returns:
- the enumerable assert
-
hasSize
public U hasSize(int expected)
Description copied from interface:EnumerableAssert
Verifies that the enumerable has the expected size.- Specified by:
hasSize
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Parameters:
expected
- the array- Returns:
- the enumerable assert
-
isEmpty
public U isEmpty()
Description copied from interface:EnumerableAssert
Verifies that the enumerable is empty.- Specified by:
isEmpty
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Returns:
- the enumerable assert
-
isNotEmpty
public U isNotEmpty()
Description copied from interface:EnumerableAssert
Verifies that the enumerable is not empty.- Specified by:
isNotEmpty
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Returns:
- the enumerable assert
-
isNullOrEmpty
public U isNullOrEmpty()
Description copied from interface:EnumerableAssert
Verifies that the enumerable is null or empty.- Specified by:
isNullOrEmpty
in interfaceEnumerableAssert<T,U extends EnumerableAssert<T,U>>
- Returns:
- the enumerable assert
-
-