Package org.fest.swing.fixture

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


        // Check displayed fitness.
        String fitnessText = frameFixture.label("FitnessLabel").text();
        assert fitnessText.equals("10.0") : "Wrong fitness score displayed: " + fitnessText;

        // Check rendered candidate.
        frameFixture.textBox().requireNotEditable();
        String text = frameFixture.textBox().component().getText();
        assert text.equals("10") : "Candidate rendered incorrectly.";
    }

View Full Code Here


        String fitnessText = frameFixture.label("FitnessLabel").text();
        assert fitnessText.equals("10.0") : "Wrong fitness score displayed: " + fitnessText;

        // Check rendered candidate.
        frameFixture.textBox().requireNotEditable();
        String text = frameFixture.textBox().component().getText();
        assert text.equals("10") : "Candidate rendered incorrectly.";
    }


    /**
 
View Full Code Here

        PopulationData<BigDecimal> data1 = new PopulationData<BigDecimal>(BigDecimal.TEN, 10, 5, 2, true, 5, 0, 1, 100);
        // Render the first time.
        view.populationUpdate(data1);
        robot.waitForIdle();
        JTextComponent component1 = frameFixture.textBox().component();

        // Render the same candidate for the second generation.
        PopulationData<BigDecimal> data2 = new PopulationData<BigDecimal>(BigDecimal.TEN, 10, 5, 2, true, 5, 0, 2, 100);
        view.populationUpdate(data2);
        robot.waitForIdle();
View Full Code Here

        // Render the same candidate for the second generation.
        PopulationData<BigDecimal> data2 = new PopulationData<BigDecimal>(BigDecimal.TEN, 10, 5, 2, true, 5, 0, 2, 100);
        view.populationUpdate(data2);
        robot.waitForIdle();
        JTextComponent component2 = frameFixture.textBox().component();

        assert component1 == component2 : "Rendered component should be the same.";
    }
}
View Full Code Here

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

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

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

    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();
    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");
View Full Code Here

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

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