Package org.fest.swing.fixture

Examples of org.fest.swing.fixture.DialogFixture.target()


public class WindowFinder_findDialog_byType_Test extends WindowFinder_TestCase {
  @Test
  public void should_find_Dialog() {
    clickLaunchDialogButton();
    DialogFixture found = WindowFinder.findDialog(DialogToLaunch.class).using(robot);
    assertThat(found.target()).isInstanceOf(DialogToLaunch.class);
  }

  @Test
  public void should_find_Dialog_before_given_timeout_expires() {
    clickLaunchDialogButton();
View Full Code Here


  @Test
  public void should_find_Dialog_before_given_timeout_expires() {
    clickLaunchDialogButton();
    DialogFixture found = WindowFinder.findDialog(DialogToLaunch.class).withTimeout(500, MILLISECONDS).using(robot);
    assertThat(found.target()).isInstanceOf(DialogToLaunch.class);
  }

  @Test
  public void should_find_Dialog_before_given_timeout_in_ms_expires() {
    clickLaunchDialogButton();
View Full Code Here

  @Test
  public void should_find_Dialog_before_given_timeout_in_ms_expires() {
    clickLaunchDialogButton();
    DialogFixture found = WindowFinder.findDialog(DialogToLaunch.class).withTimeout(500).using(robot);
    assertThat(found.target()).isInstanceOf(DialogToLaunch.class);
  }

  @Test(expected = WaitTimedOutError.class)
  public void should_fail_if_Dialog_not_found() {
    WindowFinder.findDialog(DialogToLaunch.class).using(robot);
View Full Code Here

  @Test
  public void should_find_Dialog() {
    clickLaunchDialogButton();
    DialogFixture found = WindowFinder.findDialog(matcher).using(robot);
    assertThat(found.target()).isInstanceOf(DialogToLaunch.class);
  }

  @Test
  public void should_find_Dialog_before_given_timeout_expires() {
    clickLaunchDialogButton();
View Full Code Here

  @Test
  public void should_find_Dialog_before_given_timeout_expires() {
    clickLaunchDialogButton();
    DialogFixture found = WindowFinder.findDialog(matcher).withTimeout(500, MILLISECONDS).using(robot);
    assertThat(found.target()).isInstanceOf(DialogToLaunch.class);
  }

  @Test
  public void should_find_Dialog_before_given_timeout_in_ms_expires() {
    clickLaunchDialogButton();
View Full Code Here

  @Test
  public void should_find_Dialog_before_given_timeout_in_ms_expires() {
    clickLaunchDialogButton();
    DialogFixture found = WindowFinder.findDialog(matcher).withTimeout(500).using(robot);
    assertThat(found.target()).isInstanceOf(DialogToLaunch.class);
  }

  @Test(expected = WaitTimedOutError.class)
  public void should_fail_if_Dialog_not_found() {
    WindowFinder.findDialog(matcher).using(robot);
View Full Code Here

  public void should_not_block() {
    TestWindow window = TestWindow.createNewWindow(getClass());
    robot.showWindow(window);
    MyDialog.createAndShowNew(window);
    DialogFixture found = findDialog(JDialog.class).using(robot);
    assertThat(found.target()).isInstanceOf(MyDialog.class);
  }

  private static class MyDialog extends TestDialog {
    @RunsInEDT
    static void createAndShowNew(final Frame owner) {
View Full Code Here

public class WindowFinder_findDialog_byName_Test extends WindowFinder_TestCase {
  @Test
  public void should_find_Dialog() {
    clickLaunchDialogButton();
    DialogFixture found = WindowFinder.findDialog("dialog").using(robot);
    assertThat(found.target()).isInstanceOf(DialogToLaunch.class);
  }

  @Test
  public void should_find_Dialog_before_given_timeout_expires() {
    clickLaunchDialogButton();
View Full Code Here

  @Test
  public void should_find_Dialog_before_given_timeout_expires() {
    clickLaunchDialogButton();
    DialogFixture found = WindowFinder.findDialog("dialog").withTimeout(500, MILLISECONDS).using(robot);
    assertThat(found.target()).isInstanceOf(DialogToLaunch.class);
  }

  @Test
  public void should_find_Dialog_before_given_timeout_in_ms_expires() {
    clickLaunchDialogButton();
View Full Code Here

  @Test
  public void should_find_Dialog_before_given_timeout_in_ms_expires() {
    clickLaunchDialogButton();
    DialogFixture found = WindowFinder.findDialog("dialog").withTimeout(500).using(robot);
    assertThat(found.target()).isInstanceOf(DialogToLaunch.class);
  }

  @Test(expected = WaitTimedOutError.class)
  public void should_fail_if_Dialog_not_found() {
    WindowFinder.findDialog("dialog").using(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.