Package org.fest.swing.timing

Examples of org.fest.swing.timing.Condition


    URL cutIconUrl = CommandToggleButtonTestCase.class.getClassLoader()
        .getResource("utest/common/edit-cut.svg");
    Assertions.assertThat(cutIconUrl).isNotNull();
    final ResizableIcon cutIcon = SvgBatikResizableIcon.getSvgIcon(
        cutIconUrl, new Dimension(16, 16));
    Pause.pause(new Condition("Waiting to load the SVG icon") {
      @Override
      public boolean test() {
        return !((AsynchronousLoading) cutIcon).isLoading();
      }
    });
View Full Code Here


    URL cutIconUrl = CommandToggleButtonTestCase.class.getClassLoader()
        .getResource("utest/common/edit-cut.svg");
    Assertions.assertThat(cutIconUrl).isNotNull();
    final ResizableIcon cutIcon = SvgBatikResizableIcon.getSvgIcon(
        cutIconUrl, new Dimension(16, 16));
    Pause.pause(new Condition("Waiting to load the SVG icon") {
      @Override
      public boolean test() {
        return !((AsynchronousLoading) cutIcon).isLoading();
      }
    });
View Full Code Here

    URL resource = ActionCommandButtonTestCase.class.getClassLoader()
        .getResource("utest/common/edit-paste.svg");
    Assertions.assertThat(resource).isNotNull();
    final ResizableIcon icon = SvgBatikResizableIcon.getSvgIcon(resource,
        new Dimension(32, 32));
    Pause.pause(new Condition("Waiting to load the SVG icon") {
      @Override
      public boolean test() {
        return !((AsynchronousLoading) icon).isLoading();
      }
    });
View Full Code Here

    URL cutIconUrl = ActionCommandButtonTestCase.class.getClassLoader()
        .getResource("utest/common/edit-cut.svg");
    Assertions.assertThat(cutIconUrl).isNotNull();
    final ResizableIcon cutIcon = SvgBatikResizableIcon.getSvgIcon(
        cutIconUrl, new Dimension(16, 16));
    Pause.pause(new Condition("Waiting to load the SVG icon") {
      @Override
      public boolean test() {
        return !((AsynchronousLoading) cutIcon).isLoading();
      }
    });
View Full Code Here

*/
final class JProgressBarWaitUntilValueIsEqualToExpectedTask {

  @RunsInEDT
  static void waitUntilValueIsEqualToExpected(final JProgressBar progressBar, final int expected, final Timeout timeout) {
    pause(new Condition(untilValueIsEqualTo(progressBar, expected)) {
      public boolean test() {
        return valueOf(progressBar) == expected;
      }
    }, timeout);
  }
View Full Code Here

      protected void executeInEDT() {
        viewer.pack();
        viewer.setVisible(true);
      }
    });
    pause(new Condition("new AppletViewer to be showing") {
      public boolean test() {
        return viewer.isShowing();
      }
    });
    return viewer;
View Full Code Here

*/
final class JProgressBarWaitUntilIsDeterminate {

  @RunsInEDT
  static void waitUntilValueIsDeterminate(final JProgressBar progressBar, final Timeout timeout) {
    pause(new Condition(untilIsDeterminate(progressBar)) {
      public boolean test() {
        return !isIndeterminate(progressBar);
      }
    }, timeout);
  }
View Full Code Here

        ComponentSpec cs1 = Mockito.mock(ComponentSpec.class);
        ComponentSpec cs2 = Mockito.mock(ComponentSpec.class);
        QueryResult q = new QueryResult(2, Arrays.asList(cs1, cs2));
        platformSearchUI.setQueryResult(q);
        window.button(new JButtonMatcher("Search")).click();
        Condition condition = new Condition("Results Arrived.") {
           
            @Test
      @Override
            public boolean test() {
                return list.target.getModel().getSize() > 0;
View Full Code Here

TOP

Related Classes of org.fest.swing.timing.Condition

Copyright © 2018 www.massapicom. 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.