Package org.jbehave.threaded.swing

Examples of org.jbehave.threaded.swing.WindowWrapper.findComponent()


    protected void verifyAnyTimeIn(World world) {
        WindowWrapper windowWrapper = (WindowWrapper) world.get(WorldKey.WINDOW_WRAPPER);
        JLabel messageLabel = null;
        try {
             messageLabel = (JLabel) windowWrapper.findComponent(ComponentNames.GAME_MESSAGE);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        Ensure.that(messageLabel.getText(), eq("Game over, man! Game over!"));
    }
View Full Code Here


   
    frame.setVisible(true);
    wrapper.clickButton("startGame.button");   
    verifyMocks();
   
    JButton button = (JButton)wrapper.findComponent("startGame.button");
    Ensure.that("Start Game", eq(button.getText()));
   
    frame.dispose();
  }
}
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.