本文整理汇总了Java中org.assertj.swing.edt.GuiActionRunner类的典型用法代码示例。如果您正苦于以下问题:Java GuiActionRunner类的具体用法?Java GuiActionRunner怎么用?Java GuiActionRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GuiActionRunner类属于org.assertj.swing.edt包,在下文中一共展示了GuiActionRunner类的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: testSaveSettingsWithoutParse
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Test
public void testSaveSettingsWithoutParse() {
final Set<Alphabet> newAlphabets = createAlphabetSet(Alphabet.DIGITS, Alphabet.LOWERCASE, Alphabet.SPECIAL);
GuiActionRunner.execute(() -> {
frame.spinner("minLength").target().setValue(445);
frame.spinner("maxLength").target().setValue(803);
frame.radioButton("enclosureBacktick").target().setSelected(true);
frame.list("alphabets").target().setSelectedIndices(toIndexForEach(newAlphabets));
});
stringSettingsDialog.saveSettings();
assertThat(stringSettings.getMinLength()).isEqualTo(445);
assertThat(stringSettings.getMaxLength()).isEqualTo(803);
assertThat(stringSettings.getEnclosure()).isEqualTo("`");
assertThat(stringSettings.getAlphabets()).isEqualTo(newAlphabets);
}
示例3: testSaveSettingsWithoutParse
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Test
public void testSaveSettingsWithoutParse() {
GuiActionRunner.execute(() -> {
frame.spinner("minValue").target().setValue(112.54);
frame.spinner("maxValue").target().setValue(644.74);
frame.spinner("decimalCount").target().setValue(485);
frame.radioButton("groupingSeparatorUnderscore").target().setSelected(true);
frame.radioButton("decimalSeparatorComma").target().setSelected(true);
});
decimalSettingsDialog.saveSettings();
assertThat(decimalSettings.getMinValue()).isEqualTo(112.54);
assertThat(decimalSettings.getMaxValue()).isEqualTo(644.74);
assertThat(decimalSettings.getDecimalCount()).isEqualTo(485);
assertThat(decimalSettings.getGroupingSeparator()).isEqualTo('_');
assertThat(decimalSettings.getDecimalSeparator()).isEqualTo(',');
}
示例4: testSaveSettingsWithoutParse
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Test
public void testSaveSettingsWithoutParse() {
GuiActionRunner.execute(() -> {
frame.spinner("minLength").target().setValue(840);
frame.spinner("maxLength").target().setValue(861);
frame.radioButton("enclosureSingle").target().setSelected(true);
frame.radioButton("capitalizationLower").target().setSelected(true);
});
wordSettingsDialog.saveSettings();
assertThat(wordSettings.getMinLength()).isEqualTo(840);
assertThat(wordSettings.getMaxLength()).isEqualTo(861);
assertThat(wordSettings.getEnclosure()).isEqualTo("'");
assertThat(wordSettings.getCapitalization()).isEqualTo(CapitalizationMode.LOWER);
}
示例5: 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();
}
示例6: 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());
}
示例7: onSetUp
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
protected void onSetUp() {
arraySettings = new ArraySettings();
arraySettingsDialog = GuiActionRunner.execute(() -> new ArraySettingsDialog(arraySettings));
frame = showInFrame(robot(), arraySettingsDialog.createCenterPanel());
}
示例8: testValidateCountNegative
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Test
public void testValidateCountNegative() {
GuiActionRunner.execute(() -> frame.spinner("count").target().setValue(-172));
final ValidationInfo validationInfo = arraySettingsDialog.doValidate();
assertThat(validationInfo).isNotNull();
assertThat(validationInfo.component).isEqualTo(frame.spinner("count").target());
assertThat(validationInfo.message).isEqualTo("Please enter a value greater than or equal to 1.");
}
示例9: testValidateCountOverflow
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Test
public void testValidateCountOverflow() {
GuiActionRunner.execute(() -> frame.spinner("count").target().setValue((long) Integer.MAX_VALUE + 2L));
final ValidationInfo validationInfo = arraySettingsDialog.doValidate();
assertThat(validationInfo).isNotNull();
assertThat(validationInfo.component).isEqualTo(frame.spinner("count").target());
assertThat(validationInfo.message).isEqualTo("Please enter a value less than or equal to 2147483647.");
}
示例10: onSetUp
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Override
protected void onSetUp() {
integerSettings = new IntegerSettings();
integerSettings.setMinValue(DEFAULT_MIN_VALUE);
integerSettings.setMaxValue(DEFAULT_MAX_VALUE);
integerSettingsDialog = GuiActionRunner.execute(() -> new IntegerSettingsDialog(integerSettings));
frame = showInFrame(robot(), integerSettingsDialog.createCenterPanel());
}
示例11: 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.");
}
示例12: 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.");
}
示例13: testSaveSettingsWithoutParse
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Test
public void testSaveSettingsWithoutParse() {
GuiActionRunner.execute(() -> {
frame.spinner("minValue").target().setValue((long) Integer.MAX_VALUE + 1L);
frame.spinner("maxValue").target().setValue((long) Integer.MAX_VALUE + 2L);
integerSettingsDialog.saveSettings();
});
assertThat(integerSettings.getMinValue()).isEqualTo(2147483648L);
assertThat(integerSettings.getMaxValue()).isEqualTo(2147483649L);
}
示例14: testSaveSettingsWithParse
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Test
public void testSaveSettingsWithParse() {
frame.spinner("minValue").enterTextAndCommit("2147483648");
frame.spinner("maxValue").enterTextAndCommit("2147483649");
GuiActionRunner.execute(() -> integerSettingsDialog.saveSettings());
assertThat(integerSettings.getMinValue()).isEqualTo(2147483648L);
assertThat(integerSettings.getMaxValue()).isEqualTo(2147483649L);
}
示例15: onSetUp
import org.assertj.swing.edt.GuiActionRunner; //导入依赖的package包/类
@Override
protected void onSetUp() {
stringSettings = new StringSettings();
stringSettings.setMinLength(DEFAULT_MIN_VALUE);
stringSettings.setMaxLength(DEFAULT_MAX_VALUE);
stringSettings.setEnclosure(DEFAULT_ENCLOSURE);
stringSettings.setAlphabets(DEFAULT_ALPHABETS);
stringSettingsDialog = GuiActionRunner.execute(() -> new StringSettingsDialog(stringSettings));
frame = showInFrame(robot(), stringSettingsDialog.createCenterPanel());
}