Interface ListStateAssert

All Known Implementing Classes:
FluentListAssert

public interface ListStateAssert
Interface for asserting the state of an element.
  • Method Details

    • hasSize

      Creates a FluentListSizeBuilder 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

      FluentListAssert hasSize (int expectedSize)
      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