Interface AssertOnNumberOfColumns<T extends AssertOnNumberOfColumns<T>>

Type Parameters:
T - The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
All Known Implementing Classes:
AbstractDbAssert, AbstractRowAssert, ChangeAssert, ChangeRowAssert, RequestAssert, RequestRowAssert, TableAssert, TableRowAssert

public interface AssertOnNumberOfColumns<T extends AssertOnNumberOfColumns<T>>
Defines the assertion method on the number of columns.
Author:
Régis Pouiller
  • Method Details

    • hasNumberOfColumns

      T hasNumberOfColumns(int expected)
      Verifies that the number of columns is equal to the number in parameter.

      Example where the assertion verifies that the table has 8 columns :

      
       assertThat(table).hasNumberOfColumns(8);
       

      Example where the assertion verifies that the first row of the table has 8 columns :

      
       assertThat(table).row().hasNumberOfColumns(8);
       

      Example where the assertion verifies that the row at end point of the first change has 8 columns :

      
       assertThat(changes).change().rowAtEndPoint().hasNumberOfColumns(8);
       
      Parameters:
      expected - The number to compare to the number of columns.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the number of columns is different to the number in parameter.
      See Also:
    • hasNumberOfColumnsGreaterThan

      T hasNumberOfColumnsGreaterThan(int expected)
      Verifies that the number of columns is greater than the number in parameter.

      Example where the assertion verifies that the table has more than 8 columns :

      
       assertThat(table).hasNumberOfColumnsGreaterThan(8);
       

      Example where the assertion verifies that the first row of the table has more than 8 columns :

      
       assertThat(table).row().hasNumberOfColumnsGreaterThan(8);
       

      Example where the assertion verifies that the row at end point of the first change has more than 8 columns :

      
       assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThan(8);
       
      Parameters:
      expected - The number to compare to the number of columns.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the number of columns is less than or equal to the number in parameter.
      Since:
      1.1.0
      See Also:
    • hasNumberOfColumnsLessThan

      T hasNumberOfColumnsLessThan(int expected)
      Verifies that the number of columns is less than the number in parameter.

      Example where the assertion verifies that the table has less than 8 columns :

      
       assertThat(table).hasNumberOfColumnsLessThan(8);
       

      Example where the assertion verifies that the first row of the table has less than 8 columns :

      
       assertThat(table).row().hasNumberOfColumnsLessThan(8);
       

      Example where the assertion verifies that the row at end point of the first change has less than 8 columns :

      
       assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThan(8);
       
      Parameters:
      expected - The number to compare to the number of columns.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the number of columns is greater than or equal to the number in parameter.
      Since:
      1.1.0
      See Also:
    • hasNumberOfColumnsGreaterThanOrEqualTo

      T hasNumberOfColumnsGreaterThanOrEqualTo(int expected)
      Verifies that the number of columns is greater than or equal to the number in parameter.

      Example where the assertion verifies that the table has at least 8 columns :

      
       assertThat(table).hasNumberOfColumnsGreaterThanOrEqualTo(8);
       

      Example where the assertion verifies that the first row of the table has at least 8 columns :

      
       assertThat(table).row().hasNumberOfColumnsGreaterThanOrEqualTo(8);
       

      Example where the assertion verifies that the row at end point of the first change has at least 8 columns :

      
       assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThanOrEqualTo(8);
       
      Parameters:
      expected - The number to compare to the number of columns.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the number of columns is less than the number in parameter.
      Since:
      1.1.0
      See Also:
    • hasNumberOfColumnsLessThanOrEqualTo

      T hasNumberOfColumnsLessThanOrEqualTo(int expected)
      Verifies that the number of columns is less than or equal to the number in parameter.

      Example where the assertion verifies that the table has at most 8 columns :

      
       assertThat(table).hasNumberOfColumnsLessThanOrEqualTo(8);
       

      Example where the assertion verifies that the first row of the table has at most 8 columns :

      
       assertThat(table).row().hasNumberOfColumnsLessThanOrEqualTo(8);
       

      Example where the assertion verifies that the row at end point of the first change has at most 8 columns :

      
       assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThanOrEqualTo(8);
       
      Parameters:
      expected - The number to compare to the number of columns.
      Returns:
      this assertion object.
      Throws:
      AssertionError - If the number of columns is greater than the number in parameter.
      Since:
      1.1.0
      See Also: