Class FluentListSizeBuilder


  • public class FluentListSizeBuilder
    extends Object
    Builder for fluent list size assertion.
    • Method Detail

      • lessThan

        public FluentListAssert lessThan​(int size)
        Assert that actual list size is less that given size.
        Parameters:
        size - expected size
        Returns:
        ${code this} assertion object.
      • lessThanOrEqualTo

        public FluentListAssert lessThanOrEqualTo​(int size)
        Assert that actual list size is less than or equal to given size.
        Parameters:
        size - expected size
        Returns:
        ${code this} assertion object.
      • greaterThan

        public FluentListAssert greaterThan​(int size)
        Assert that actual list size is greater than given size.
        Parameters:
        size - expected size
        Returns:
        ${code this} assertion object.
      • greaterThanOrEqualTo

        public FluentListAssert greaterThanOrEqualTo​(int size)
        Assert that actual list size is greater than or equal to given size.
        Parameters:
        size - expected size
        Returns:
        ${code this} assertion object.
      • notEqualTo

        public FluentListAssert notEqualTo​(int size)
        Assert that actual list size is different to given size.
        Parameters:
        size - expected size
        Returns:
        ${code this} assertion object.
      • equalTo

        public FluentListAssert equalTo​(int size)
        Assert that actual list size is equal to given size.

        As an alternate solution you can call the following assertion directly:

         assertThat(elementList).hasSize(5);
         
        Parameters:
        size - expected size
        Returns:
        ${code this} assertion object.