Examples of TableCell


Examples of org.fest.swing.data.TableCell

  @Test
  public void should_show_popup_menu() {
    showWindow();
    driver.click(table);
    ClickRecorder recorder = attachTo(table);
    TableCell cell = row(0).column(1);
    JPopupMenu found = driver.showPopupMenuAt(table, cell);
    assertThat(found).isSameAs(popupMenu);
    assertThat(recorder).clicked(RIGHT_BUTTON).timesClicked(1);
    assertThatCellWasClicked(cell, recorder.pointClicked());
  }
View Full Code Here

Examples of org.fest.swing.data.TableCell

    cellFinder = mock(TableCellFinder.class);
  }

  @Test
  public void should_use_TableCellFinder_to_find_a_cell() {
    TableCell cell = row(0).column(0);
    when(cellFinder.findCell(table, driver.cellReader())).thenReturn(cell);
    TableCell found = driver.cell(table, cellFinder);
    assertThat(found).isSameAs(cell);
  }
View Full Code Here

Examples of org.fest.swing.data.TableCell

    assertThat(found).isSameAs(cell);
  }

  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_indices_in_found_cell_are_out_of_bounds() {
    TableCell cell = row(-1).column(0);
    when(cellFinder.findCell(table, driver.cellReader())).thenReturn(cell);
    driver.cell(table, cellFinder);
  }
View Full Code Here

Examples of org.fest.swing.data.TableCell

public class JTableDriver_clickCell_Test extends JTableDriver_TestCase {
  @Test
  public void should_click_cell() {
    showWindow();
    ClickRecorder recorder = attachTo(table);
    TableCell cell = row(0).column(1);
    driver.click(table, cell, LEFT_BUTTON, 3);
    assertThat(recorder).clicked(LEFT_BUTTON).timesClicked(3);
    assertThatCellWasClicked(cell, recorder.pointClicked());
  }
View Full Code Here

Examples of org.fest.swing.data.TableCell

* @author Yvonne Wang
*/
public class JTableDriver_cellByPattern_Test extends JTableDriver_TestCase {
  @Test
  public void should_find_cell_having_value_that_matches_given_pattern() {
    TableCell cell = driver.cell(table, Pattern.compile("1.*"));
    assertThat(cell.row).isEqualTo(1);
    assertThat(cell.column).isEqualTo(0);
    assertThatCellReaderWasCalled();
  }
View Full Code Here

Examples of org.fest.swing.data.TableCell

* @author Alex Ruiz
*/
public class JTableCellValidator_validateCellIndices_Test {
  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_JTable_is_empty() {
    TableCell cell = TableCell.row(2).column(3);
    JTableCellPreconditions.checkCellIndicesInBounds(table().createNew(), cell);
  }
View Full Code Here

Examples of org.fest.swing.data.TableCell

    JTableCellPreconditions.checkCellIndicesInBounds(table().createNew(), cell);
  }

  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_row_is_negative() {
    TableCell cell = TableCell.row(-2).column(3);
    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }
View Full Code Here

Examples of org.fest.swing.data.TableCell

    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }

  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_column_is_negative() {
    TableCell cell = TableCell.row(2).column(-3);
    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }
View Full Code Here

Examples of org.fest.swing.data.TableCell

    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }

  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_row_is_out_of_bounds() {
    TableCell cell = TableCell.row(4).column(2);
    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }
View Full Code Here

Examples of org.fest.swing.data.TableCell

    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }

  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_column_is_out_of_bounds() {
    TableCell cell = TableCell.row(0).column(3);
    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.