Java Code Examples for org.assertj.swing.edt.GuiActionRunner

The following examples show how to use org.assertj.swing.edt.GuiActionRunner. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: json2java4idea   Source File: SettingsPanelTest.java    License: Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    final IdeaTestFixtureFactory ideaFixtureFactory = IdeaTestFixtureFactory.getFixtureFactory();
    testFixture = ideaFixtureFactory.createBareFixture();
    testFixture.setUp();
    application = ApplicationManager.getApplication();
    underTest = GuiActionRunner.execute(SettingsPanel::new);
    window = Containers.showInFrame(underTest.getComponent());
}
 
Example 2
Source Project: testing-cin   Source File: CalculatorGUITests.java    License: MIT License 5 votes vote down vote up
@Before
   public void setup() {
Calculator frame = GuiActionRunner.execute(new GuiQuery<Calculator>() {
	protected Calculator executeInEDT() {
	    return new Calculator();
	}
    });
window = new FrameFixture(frame);
window.show(); // shows the frame to test
   }
 
Example 3
Source Project: testing-cin   Source File: CalculatorGUITests_Alternative.java    License: MIT License 5 votes vote down vote up
@Before
public void onSetUp() {
    Calculator frame = GuiActionRunner.execute(new GuiQuery<Calculator>() {
            protected Calculator executeInEDT() {
                return new Calculator();
            }
        });
    window = new FrameFixture(robot(), frame);
    window.show(); // shows the frame to test
    robot().settings().delayBetweenEvents(200);
}
 
Example 4
Source Project: Pixelitor   Source File: EDT.java    License: GNU General Public License v3.0 4 votes vote down vote up
public static <T> T call(Callable<T> callable) {
    return GuiActionRunner.execute(callable);
}
 
Example 5
Source Project: Pixelitor   Source File: EDT.java    License: GNU General Public License v3.0 4 votes vote down vote up
public static void run(GuiActionRunnable runnable) {
    GuiActionRunner.execute(runnable);
}