当前位置: 首页>>代码示例>>Java>>正文


Java GuiActionRunner.execute方法代码示例

本文整理汇总了Java中org.assertj.swing.edt.GuiActionRunner.execute方法的典型用法代码示例。如果您正苦于以下问题:Java GuiActionRunner.execute方法的具体用法?Java GuiActionRunner.execute怎么用?Java GuiActionRunner.execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.assertj.swing.edt.GuiActionRunner的用法示例。


在下文中一共展示了GuiActionRunner.execute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testSaveSettingsWithoutParse

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
public void testSaveSettingsWithoutParse() {
    GuiActionRunner.execute(() -> {
        frame.spinner("count").target().setValue(642);
        frame.radioButton("bracketsCurly").target().setSelected(true);
        frame.radioButton("separatorSemicolon").target().setSelected(true);
        frame.checkBox("spaceAfterSeparator").target().setSelected(false);
    });

    arraySettingsDialog.saveSettings();

    assertThat(arraySettings.getCount()).isEqualTo(642);
    assertThat(arraySettings.getBrackets()).isEqualTo("{}");
    assertThat(arraySettings.getSeparator()).isEqualTo(";");
    assertThat(arraySettings.isSpaceAfterSeparator()).isEqualTo(false);
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:17,代码来源:ArraySettingsDialogTest.java

示例2: setUp

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
	DBKS.getDBKS().konektatu(DBKS.getDBKS().getDefaultPath());
	DBKS.getDBKS().aginduaExekutatu(
			"INSERT OR REPLACE INTO Jokalaria(Izena, AzkenData, IrabaziKop, GalduKop) VALUES ('Test', '01-01-2010', 10,20 )");
	AlKaboom.getAlKaboom().setDatubasePath(DBKS.getDBKS().getDefaultPath());
	UI frame = GuiActionRunner.execute(new GuiQuery<UI>() {
		@Override
		protected UI executeInEDT() {
			UI oraingoUI = new UI();
			oraingoUI.dekorazioGabeHasieratu();
			oraingoUI.kautotuHasieratu();
			AlKaboom.getAlKaboom().setUI(oraingoUI);
			return oraingoUI;
		}
	});
	window = new FrameFixture(frame);
	window.show();
}
 
开发者ID:Porobu,项目名称:Al-kaboom,代码行数:20,代码来源:KautotuTest.java

示例3: setUp

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@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());
}
 
开发者ID:t28hub,项目名称:json2java4idea,代码行数:10,代码来源:SettingsPanelTest.java

示例4: start

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Before
public void start() throws Exception {
	application(Start.class).start();
	
	AppFrame notesFrame = GuiActionRunner.execute(new Callable<AppFrame>() {
		public AppFrame call() throws Exception {
			return new AppFrame();
		}
	});
	
	window = new FrameFixture(notesFrame);
	window.show();
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:14,代码来源:testStrikethrough.java

示例5: testValidateEmptyAlphabetSelection

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
public void testValidateEmptyAlphabetSelection() {
    GuiActionRunner.execute(() -> frame.list("alphabets").target().clearSelection());

    final ValidationInfo validationInfo = stringSettingsDialog.doValidate();

    assertThat(validationInfo).isNotNull();
    assertThat(validationInfo.component).isEqualTo(frame.list("alphabets").target());
    assertThat(validationInfo.message).isEqualTo("Please select at least one option.");
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:11,代码来源:StringSettingsDialogTest.java

示例6: testValidateMaxValueOverflow

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
public void testValidateMaxValueOverflow() {
    GuiActionRunner.execute(() -> frame.spinner("maxValue").target().setValue(1E54));

    final ValidationInfo validationInfo = decimalSettingsDialog.doValidate();

    assertThat(validationInfo).isNotNull();
    assertThat(validationInfo.component).isEqualTo(frame.spinner("maxValue").target());
    assertThat(validationInfo.message).isEqualTo("Please enter a value less than or equal to 1.0E53.");
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:11,代码来源:DecimalSettingsDialogTest.java

示例7: testAddDictionaryDuplicate

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
@Ignore("Doesn't work with IntelliJ file chooser")
public void testAddDictionaryDuplicate() {
    GuiActionRunner.execute(() -> dialogDictionaries
            .addEntry(Dictionary.UserDictionary.get(getDictionaryFile("dictionaries/simple.dic")
                                                            .getCanonicalPath())));

    frame.button("dictionaryAdd").click();
    JFileChooserFinder.findFileChooser().using(robot())
            .selectFile(getDictionaryFile("dictionaries/simple.dic"))
            .approve();

    assertThat(dialogDictionaries.getEntryCount())
            .isEqualTo(2);
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:16,代码来源:WordSettingsDialogTest.java

示例8: testValidateMaxValueGreaterThanMinValue

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
public void testValidateMaxValueGreaterThanMinValue() {
    GuiActionRunner.execute(() -> frame.spinner("maxValue").target().setValue(DEFAULT_MIN_VALUE - 1));

    final ValidationInfo validationInfo = integerSettingsDialog.doValidate();

    assertThat(validationInfo).isNotNull();
    assertThat(validationInfo.component).isEqualTo(frame.spinner("maxValue").target());
    assertThat(validationInfo.message).isEqualTo("The maximum should be no smaller than the minimum.");
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:11,代码来源:IntegerSettingsDialogTest.java

示例9: testValidateValueRange

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
public void testValidateValueRange() {
    GuiActionRunner.execute(() -> {
        frame.spinner("minValue").target().setValue(Long.MIN_VALUE);
        frame.spinner("maxValue").target().setValue(Long.MAX_VALUE);
    });

    final ValidationInfo validationInfo = integerSettingsDialog.doValidate();

    assertThat(validationInfo).isNotNull();
    assertThat(validationInfo.component).isEqualTo(frame.spinner("maxValue").target());
    assertThat(validationInfo.message).isEqualTo("The range should not exceed 9.223372036854776E18.");
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:14,代码来源:IntegerSettingsDialogTest.java

示例10: setUp

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
	application(Start.class).start();
	AppFrame notesFrame = GuiActionRunner.execute(() -> new AppFrame());
	window = new FrameFixture(notesFrame);
	//window.show();
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:8,代码来源:testSubscript.java

示例11: testValidateMaxLengthOverflow

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
public void testValidateMaxLengthOverflow() {
    GuiActionRunner.execute(() -> frame.spinner("maxLength").target().setValue((long) Integer.MAX_VALUE + 2L));

    final ValidationInfo validationInfo = wordSettingsDialog.doValidate();

    assertThat(validationInfo).isNotNull();
    assertThat(validationInfo.component).isEqualTo(frame.spinner("maxLength").target());
    assertThat(validationInfo.message).isEqualTo("Please enter a value less than or equal to 2147483647.");
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:11,代码来源:WordSettingsDialogTest.java

示例12: testValidateMaxLengthOverflow

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
public void testValidateMaxLengthOverflow() {
    GuiActionRunner.execute(() -> frame.spinner("maxLength").target().setValue((long) Integer.MAX_VALUE + 2L));

    final ValidationInfo validationInfo = stringSettingsDialog.doValidate();

    assertThat(validationInfo).isNotNull();
    assertThat(validationInfo.component).isEqualTo(frame.spinner("maxLength").target());
    assertThat(validationInfo.message).isEqualTo("Please enter a value less than or equal to 2147483647.");
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:11,代码来源:StringSettingsDialogTest.java

示例13: testValidateMinLengthNegative

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
public void testValidateMinLengthNegative() {
    GuiActionRunner.execute(() -> frame.spinner("minLength").target().setValue(-161));

    final ValidationInfo validationInfo = stringSettingsDialog.doValidate();

    assertThat(validationInfo).isNotNull();
    assertThat(validationInfo.component).isEqualTo(frame.spinner("minLength").target());
    assertThat(validationInfo.message).isEqualTo("Please enter a value greater than or equal to 1.");
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:11,代码来源:StringSettingsDialogTest.java

示例14: testRemoveBundledDictionary

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
@Test
public void testRemoveBundledDictionary() {
    GuiActionRunner.execute(() -> {
        frame.table("dictionaries").target().clearSelection();
        frame.table("dictionaries").target().addRowSelectionInterval(0, 0);
        frame.button("dictionaryRemove").target().doClick();
    });

    assertThat(frame.table("dictionaries").target().getRowCount()).isEqualTo(1);
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:11,代码来源:WordSettingsDialogTest.java

示例15: startApplication

import org.assertj.swing.edt.GuiActionRunner; //导入方法依赖的package包/类
/**
 * Starts the application
 */
protected void startApplication() {

	MidiAutomator.test = true;
	MainFrame mainFrame = GuiActionRunner
			.execute(new GuiQuery<MainFrame>() {

				@Override
				protected MainFrame executeInEDT() {

					if (ctx == null) {
						ctx = new AnnotationConfigApplicationContext(
								AppConfig.class);
					}

					presenter = (Presenter) ctx.getBean(Presenter.class);

					return presenter.openMainFrame();
				}
			});

	window = new FrameFixture(robot(), mainFrame);

	GUIAutomations.window = window;
	GUIAutomations.robot = robot();
	configure();

	try {
		currentPath = new File(".").getCanonicalPath();
	} catch (IOException e1) {
		e1.printStackTrace();
	}
}
 
开发者ID:aguelle,项目名称:MIDI-Automator,代码行数:36,代码来源:FunctionalBaseCase.java


注:本文中的org.assertj.swing.edt.GuiActionRunner.execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。