Package org.fest.swing.fixture

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


        view.populationUpdate(new PopulationData<BigDecimal>(BigDecimal.TEN, 10, 5, 2, true, 5, 0, 1, 100));
        robot.waitForIdle();

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


        FrameFixture frameFixture = new FrameFixture(robot, frame);
        frame.setSize(400, 30);
        frame.validate();
        frameFixture.show();

        assert frameFixture.label("Population").text().equals("N/A") : "Wrong initial text for population label.";
        assert frameFixture.label("Elitism").text().equals("N/A") : "Wrong initial text for elitism label.";
        assert frameFixture.label("Generations").text().equals("N/A") : "Wrong initial text for generations label.";
        assert frameFixture.label("Time").text().equals("N/A") : "Wrong initial text for elapsed time label.";

        statusBar.populationUpdate(new PopulationData<Object>(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000));
View Full Code Here

        frame.setSize(400, 30);
        frame.validate();
        frameFixture.show();

        assert frameFixture.label("Population").text().equals("N/A") : "Wrong initial text for population label.";
        assert frameFixture.label("Elitism").text().equals("N/A") : "Wrong initial text for elitism label.";
        assert frameFixture.label("Generations").text().equals("N/A") : "Wrong initial text for generations label.";
        assert frameFixture.label("Time").text().equals("N/A") : "Wrong initial text for elapsed time label.";

        statusBar.populationUpdate(new PopulationData<Object>(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000));
        assert frameFixture.label("Population").text().equals("10") : "Wrong value for popluation label.";
View Full Code Here

        frame.validate();
        frameFixture.show();

        assert frameFixture.label("Population").text().equals("N/A") : "Wrong initial text for population label.";
        assert frameFixture.label("Elitism").text().equals("N/A") : "Wrong initial text for elitism label.";
        assert frameFixture.label("Generations").text().equals("N/A") : "Wrong initial text for generations label.";
        assert frameFixture.label("Time").text().equals("N/A") : "Wrong initial text for elapsed time label.";

        statusBar.populationUpdate(new PopulationData<Object>(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000));
        assert frameFixture.label("Population").text().equals("10") : "Wrong value for popluation label.";
        assert frameFixture.label("Elitism").text().equals("1") : "Wrong value for elitism label.";
View Full Code Here

        frameFixture.show();

        assert frameFixture.label("Population").text().equals("N/A") : "Wrong initial text for population label.";
        assert frameFixture.label("Elitism").text().equals("N/A") : "Wrong initial text for elitism label.";
        assert frameFixture.label("Generations").text().equals("N/A") : "Wrong initial text for generations label.";
        assert frameFixture.label("Time").text().equals("N/A") : "Wrong initial text for elapsed time label.";

        statusBar.populationUpdate(new PopulationData<Object>(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000));
        assert frameFixture.label("Population").text().equals("10") : "Wrong value for popluation label.";
        assert frameFixture.label("Elitism").text().equals("1") : "Wrong value for elitism label.";
        // Generation count is number + 1 (because generations start at zero).
View Full Code Here

        assert frameFixture.label("Elitism").text().equals("N/A") : "Wrong initial text for elitism label.";
        assert frameFixture.label("Generations").text().equals("N/A") : "Wrong initial text for generations label.";
        assert frameFixture.label("Time").text().equals("N/A") : "Wrong initial text for elapsed time label.";

        statusBar.populationUpdate(new PopulationData<Object>(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000));
        assert frameFixture.label("Population").text().equals("10") : "Wrong value for popluation label.";
        assert frameFixture.label("Elitism").text().equals("1") : "Wrong value for elitism label.";
        // Generation count is number + 1 (because generations start at zero).
        assert frameFixture.label("Generations").text().equals("1") : "Wrong value for generations label.";
        assert frameFixture.label("Time").text().equals("10:10:10") : "Wrong value for elapsed time label.";
    }
View Full Code Here

        assert frameFixture.label("Generations").text().equals("N/A") : "Wrong initial text for generations label.";
        assert frameFixture.label("Time").text().equals("N/A") : "Wrong initial text for elapsed time label.";

        statusBar.populationUpdate(new PopulationData<Object>(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000));
        assert frameFixture.label("Population").text().equals("10") : "Wrong value for popluation label.";
        assert frameFixture.label("Elitism").text().equals("1") : "Wrong value for elitism label.";
        // Generation count is number + 1 (because generations start at zero).
        assert frameFixture.label("Generations").text().equals("1") : "Wrong value for generations label.";
        assert frameFixture.label("Time").text().equals("10:10:10") : "Wrong value for elapsed time label.";
    }
View Full Code Here

        statusBar.populationUpdate(new PopulationData<Object>(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000));
        assert frameFixture.label("Population").text().equals("10") : "Wrong value for popluation label.";
        assert frameFixture.label("Elitism").text().equals("1") : "Wrong value for elitism label.";
        // Generation count is number + 1 (because generations start at zero).
        assert frameFixture.label("Generations").text().equals("1") : "Wrong value for generations label.";
        assert frameFixture.label("Time").text().equals("10:10:10") : "Wrong value for elapsed time label.";
    }


    @Test(groups = "display-required") // Will fail if run in a headless environment.
View Full Code Here

        statusBar.populationUpdate(new PopulationData<Object>(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000));
        assert frameFixture.label("Population").text().equals("10") : "Wrong value for popluation label.";
        assert frameFixture.label("Elitism").text().equals("1") : "Wrong value for elitism label.";
        // Generation count is number + 1 (because generations start at zero).
        assert frameFixture.label("Generations").text().equals("1") : "Wrong value for generations label.";
        assert frameFixture.label("Time").text().equals("10:10:10") : "Wrong value for elapsed time label.";
    }


    @Test(groups = "display-required") // Will fail if run in a headless environment.
    public void testFieldUpdatesForIslandMode()
View Full Code Here

        FrameFixture frameFixture = new FrameFixture(robot, frame);
        frame.setSize(400, 30);
        frame.validate();
        frameFixture.show();

        assert frameFixture.label("Population").text().equals("N/A") : "Wrong initial text for population label.";
        assert frameFixture.label("Elitism").text().equals("N/A") : "Wrong initial text for elitism label.";
        assert frameFixture.label("Generations").text().equals("N/A") : "Wrong initial text for generations label.";
        assert frameFixture.label("Time").text().equals("N/A") : "Wrong initial text for elapsed time label.";

        statusBar.islandPopulationUpdate(0, new PopulationData<Object>(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000));
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.