Package org.uispec4j.interception

Examples of org.uispec4j.interception.WindowHandler


    @Test
    public void testViewTests() {
        window.getMenuBar().getMenu("Run").getSubMenu("SimpleSet").click();
        WindowInterceptor.init(window.getMenuBar().getMenu("View").getSubMenu("View Tests Window").triggerClick())
        .process(new WindowHandler() {
            public Trigger process(Window configurationDialog) {
                assertTrue(configurationDialog.titleEquals("Results - ModelJUnit"));
                assertTrue(configurationDialog.getTextBox("resultsOutput").textEquals(
                                "done (FF, addS2, FT)\n" +
                                                "done (FT, addS1, TT)\n" +
View Full Code Here


    @Test
    public void testAnimateModel() {
        window.getMenuBar().getMenu("Run").getSubMenu("SimpleSet").click();
        WindowInterceptor.init(window.getMenuBar().getMenu("View").getSubMenu("Animate Window").triggerClick())
        .process(new WindowHandler() {
            public Trigger process(Window configurationDialog) {
                assertTrue(configurationDialog.titleEquals("Animator - ModelJUnit"));

                assertTrue(configurationDialog.getButton(displayedNameIdentity("addS1")).isEnabled());
                assertTrue(configurationDialog.getButton(displayedNameIdentity("addS2")).isEnabled());
View Full Code Here

    @Test
    public void testTestConfigurationWithGreedyTester() {
        window.getMenuBar().getMenu("Run").getSubMenu("SimpleSet").click();
        WindowInterceptor.init(window.getMenuBar().getMenu("Run").getSubMenu("Test Configuration...").triggerClick())
        .process(new WindowHandler() {
            public Trigger process(Window configurationDialog) {
                assertTrue(configurationDialog.titleEquals("Edit Configuration"));
                /* Set the test length to 20 */
                configurationDialog.getTextBox("totalTestLength").setText("20");
                /* Choose Greedy Walk algorithm*/
 
View Full Code Here

    @Test
    public void testViewCoverageWindow() {
        window.getMenuBar().getMenu("Run").getSubMenu("SimpleSet").click();
        WindowInterceptor.init(window.getMenuBar().getMenu("View").getSubMenu("Coverage Window").triggerClick())
        .process(new WindowHandler() {
            public Trigger process(Window configurationDialog) {
                assertTrue(configurationDialog.titleEquals("Coverage - ModelJUnit"));

                // no action can be performed after the coverage graphs window is shown,
                // so return a new trigger with empty run() implementation.
View Full Code Here

                return;
              }
            }
          }
        });
    interceptor.process(new WindowHandler() {
      public Trigger process(Window window) throws Exception {
        setWindow(window);
        return Trigger.DO_NOTHING;
      }
    }).process(new WindowHandler() {
      public Trigger process(Window window) throws Exception {
        setWindow(window);
        return Trigger.DO_NOTHING;
      }
    }).run();
View Full Code Here

TOP

Related Classes of org.uispec4j.interception.WindowHandler

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.