org.assertj.swing.edt.GuiActionRunner Java Examples

The following examples show how to use org.assertj.swing.edt.GuiActionRunner. 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 File: CalculatorGUITests.java    From testing-cin with MIT License 6 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 #2
Source File: SettingsPanelTest.java    From json2java4idea with 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 #3
Source File: CalculatorGUITests_Alternative.java    From testing-cin with 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 File: EDT.java    From Pixelitor with 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 File: EDT.java    From Pixelitor with GNU General Public License v3.0 4 votes vote down vote up
public static void run(GuiActionRunnable runnable) {
    GuiActionRunner.execute(runnable);
}