Examples of JComboBoxDriver


Examples of org.fest.swing.driver.JComboBoxDriver

    fixture.replaceDriverWith(mock(JComboBoxDriver.class));
  }

  @Test
  public void should_return_contents_using_driver() {
    JComboBoxDriver driver = fixture.driver();
    JComboBox target = fixture.target();
    String[] contents = { "One", "Two", "Three" };
    when(driver.contentsOf(target)).thenReturn(contents);
    assertThat(fixture.contents()).isSameAs(contents);
    verify(driver).contentsOf(target);
  }
View Full Code Here

Examples of org.fest.swing.driver.JComboBoxDriver

    verify(fixture.driver()).selectItem(fixture.target(), pattern);
  }

  @Test
  public void should_return_value_at_index_using_driver() {
    JComboBoxDriver driver = fixture.driver();
    JComboBox target = fixture.target();
    when(driver.value(target, 6)).thenReturn("Six");
    assertThat(fixture.valueAt(6)).isEqualTo("Six");
    verify(driver).value(target, 6);
  }
View Full Code Here

Examples of org.fest.swing.driver.JComboBoxDriver

    verify(fixture.driver()).requireItemCount(fixture.target(), 6);
  }

  @Test
  public void should_return_selection_using_driver() {
    JComboBoxDriver driver = fixture.driver();
    JComboBox target = fixture.target();
    when(driver.selectedItemOf(target)).thenReturn("Six");
    assertThat(fixture.selectedItem()).isEqualTo("Six");
    verify(driver).selectedItemOf(target);
  }
View Full Code Here

Examples of org.fest.swing.driver.JComboBoxDriver

    verify(fixture.driver()).enterText(fixture.target(), "Hello");
  }

  @Test
  public void should_return_list_using_driver() {
    JComboBoxDriver driver = fixture.driver();
    JList list = mock(JList.class);
    when(driver.dropDownList()).thenReturn(list);
    assertThat(fixture.list()).isSameAs(list);
    verify(driver).dropDownList();
  }
View Full Code Here

Examples of org.fest.swing.driver.JComboBoxDriver

    super(JComboBoxFixture.class, robot, comboBoxName, JComboBox.class);
  }

  @Override
  protected @Nonnull JComboBoxDriver createDriver(@Nonnull Robot robot) {
    return new JComboBoxDriver(robot);
  }
View Full Code Here

Examples of org.fest.swing.driver.JComboBoxDriver

    super(robot, comboBoxName, JComboBox.class);
    createDriver();
  }

  private void createDriver() {
    driver(new JComboBoxDriver(robot));
  }
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.