Package org.fest.swing.fixture

Examples of org.fest.swing.fixture.FrameFixture.button()


                // This method blocks so we can't run it on the test thread.
                selection[0] = swingConsole.select(labels);
            }
        }).start();
        Thread.sleep(250)// TO DO: Come up with a proper solution to this race condition.
        frameFixture.button("Selection-1").click();

        assert selection[0] == 1
                : "Second item (index 1) should have been selected, selection index was " + selection[0];

        robot.cleanUp();
View Full Code Here


        FrameFixture frameFixture = new FrameFixture(robot, frame);
        frame.setSize(100, 300);
        frame.validate();
        frame.setVisible(true);
        assert itineraryPanel.getSelectedCities().isEmpty() : "Should be no cities selected initially.";
        frameFixture.button("All").click();
        Collection<String> selectedCities = itineraryPanel.getSelectedCities();
        assert selectedCities.size() == CITIES.getKnownCities().size()
            : "All cities should be selected after button click.";
    }
View Full Code Here

        frame.add(itineraryPanel, BorderLayout.CENTER);
        FrameFixture frameFixture = new FrameFixture(robot, frame);
        frame.setSize(100, 300);
        frame.validate();
        frame.setVisible(true);
        frameFixture.button("All").click();
        Collection<String> selectedCities = itineraryPanel.getSelectedCities();
        assert selectedCities.size() == CITIES.getKnownCities().size()
            : "All cities should be selected after all button click.";
        frameFixture.button("None").click();
        assert itineraryPanel.getSelectedCities().isEmpty()
View Full Code Here

        frame.setVisible(true);
        frameFixture.button("All").click();
        Collection<String> selectedCities = itineraryPanel.getSelectedCities();
        assert selectedCities.size() == CITIES.getKnownCities().size()
            : "All cities should be selected after all button click.";
        frameFixture.button("None").click();
        assert itineraryPanel.getSelectedCities().isEmpty()
            : "No cities should be selected after clear button is clicked.";
    }
}
View Full Code Here

 
  @Test
  public void testPersistenceIsCalledDuringActions() {
    int persistentCount = 0;
    FrameFixture window = WindowFinder.findFrame(TITLE).using(robot);
    window.button(bundle.getString("AddExpressionTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
    window.textBox(bundle.getString("ValueControlName")).setText("1.0");
    window.textBox(bundle.getString("DisplayControlName")).setText("test display");
    Mockito.when(mockExpManifestation.getSelectedExpression()).thenReturn(expression);
    Mockito.when(expression.getPUIs()).thenReturn("isp:PARAMETER1");
View Full Code Here

    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
    window.textBox(bundle.getString("ValueControlName")).setText("1.0");
    window.textBox(bundle.getString("DisplayControlName")).setText("test display");
    Mockito.when(mockExpManifestation.getSelectedExpression()).thenReturn(expression);
    Mockito.when(expression.getPUIs()).thenReturn("isp:PARAMETER1");
    window.button(bundle.getString("ApplyTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
   
    window.textBox(bundle.getString("ValueControlName")).setText("test value2");
    window.textBox(bundle.getString("DisplayControlName")).setText("test display2");
    window.button(bundle.getString("ApplyTitle")).click();
View Full Code Here

    window.button(bundle.getString("ApplyTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
   
    window.textBox(bundle.getString("ValueControlName")).setText("test value2");
    window.textBox(bundle.getString("DisplayControlName")).setText("test display2");
    window.button(bundle.getString("ApplyTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
    window.button(bundle.getString("AddExpressionTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
    window.textBox(bundle.getString("ValueControlName")).setText("1.0");
    window.textBox(bundle.getString("DisplayControlName")).setText("test display");
View Full Code Here

   
    window.textBox(bundle.getString("ValueControlName")).setText("test value2");
    window.textBox(bundle.getString("DisplayControlName")).setText("test display2");
    window.button(bundle.getString("ApplyTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
    window.button(bundle.getString("AddExpressionTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
    window.textBox(bundle.getString("ValueControlName")).setText("1.0");
    window.textBox(bundle.getString("DisplayControlName")).setText("test display");
    Mockito.when(mockExpManifestation.getSelectedExpression()).thenReturn(expression);
    Mockito.when(expression.getPUIs()).thenReturn("isp:PARAMETER1");
View Full Code Here

    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
    window.textBox(bundle.getString("ValueControlName")).setText("1.0");
    window.textBox(bundle.getString("DisplayControlName")).setText("test display");
    Mockito.when(mockExpManifestation.getSelectedExpression()).thenReturn(expression);
    Mockito.when(expression.getPUIs()).thenReturn("isp:PARAMETER1");
    window.button(bundle.getString("ApplyTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
    window.button(bundle.getString("MoveUpOneTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();

    window.button(bundle.getString("MoveDownOneTitle")).click();
View Full Code Here

    window.textBox(bundle.getString("DisplayControlName")).setText("test display");
    Mockito.when(mockExpManifestation.getSelectedExpression()).thenReturn(expression);
    Mockito.when(expression.getPUIs()).thenReturn("isp:PARAMETER1");
    window.button(bundle.getString("ApplyTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
    window.button(bundle.getString("MoveUpOneTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();

    window.button(bundle.getString("MoveDownOneTitle")).click();
    Mockito.verify(mockExpManifestation, Mockito.times(++persistentCount)).fireFocusPersist();
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.