Package io.fluentlenium.assertj.custom
Interface ListStateAssert
- All Known Implementing Classes:
FluentListAssert
public interface ListStateAssert
Interface for asserting the state of an element.
-
Method Summary
Modifier and TypeMethodDescriptionhasSize()
Creates aFluentListSizeBuilder
object from which further size related assertion methods may be called.hasSize
(int expectedSize) Checks whether the list size is the same as the expected one in the argument.isEmpty()
Checks if the list is empty.Checks if the list is not empty.
-
Method Details
-
hasSize
FluentListSizeBuilder hasSize()Creates aFluentListSizeBuilder
object from which further size related assertion methods may be called.This method doesn't do any assertion, only creates the new object.
Example:
assertThat(elementList).hasSize().greaterThanOrEqualTo(5);
- Returns:
- a new ist size builder
-
hasSize
Checks whether the list size is the same as the expected one in the argument.Example:
assertThat(elementList).hasSize(5);
- Parameters:
expectedSize
- expected size- Returns:
- this assertion object
-
isEmpty
FluentListAssert isEmpty()Checks if the list is empty.Example:
assertThat(elementList).isEmpty();
- Returns:
- this assertion object
-
isNotEmpty
FluentListAssert isNotEmpty()Checks if the list is not empty.Example:
assertThat(elementList).isNotEmpty();
- Returns:
- this assertion object
-