本文整理汇总了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);
}
示例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();
}
示例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());
}
示例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();
}
示例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.");
}
示例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.");
}
示例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);
}
示例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.");
}
示例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.");
}
示例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();
}
示例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.");
}
示例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.");
}
示例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.");
}
示例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);
}
示例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();
}
}