本文整理汇总了Java中org.fest.swing.exception.WaitTimedOutError类的典型用法代码示例。如果您正苦于以下问题:Java WaitTimedOutError类的具体用法?Java WaitTimedOutError怎么用?Java WaitTimedOutError使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WaitTimedOutError类属于org.fest.swing.exception包,在下文中一共展示了WaitTimedOutError类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldCreateNewSession
import org.fest.swing.exception.WaitTimedOutError; //导入依赖的package包/类
@Test
public void shouldCreateNewSession() throws InterruptedException, ConfigurationException {
// given
final String sessionName = "test session";
final String sessionDescription = null;
// when
editorFixture.menuItemWithPath("File", "New session").click();
DialogFixture dialogPane = editorFixture.dialog();
dialogPane.textBox("name").setText(sessionName);
dialogPane.button(JButtonMatcher.withText("Create")).click();
// then
try {
assertThat(editorFixture.optionPane()).isNull();
} catch (WaitTimedOutError ex) {
}
assertThat(activeSession.isSessionLoaded()).isTrue();
assertThat(activeSession.getSession()).isNotNull();
assertThat(activeSession.getSession().getName()).isEqualTo(sessionName);
assertDataPersisted(sessionName, sessionDescription);
assertControlsState();
}
示例2: shouldCreateNewSessionWithDescription
import org.fest.swing.exception.WaitTimedOutError; //导入依赖的package包/类
@Test
public void shouldCreateNewSessionWithDescription() throws InterruptedException, ConfigurationException {
// given
final String sessionName = "test session";
final String sessionDescription = "test session description";
// when
editorFixture.menuItemWithPath("File", "New session").click();
DialogFixture dialogPane = editorFixture.dialog();
dialogPane.textBox("name").setText(sessionName);
dialogPane.textBox("description").setText(sessionDescription);
dialogPane.button(JButtonMatcher.withText("Create")).click();
// then
try {
assertThat(editorFixture.optionPane()).isNull();
} catch (WaitTimedOutError ex) {
}
assertThat(activeSession.isSessionLoaded()).isTrue();
assertThat(activeSession.getSession()).isNotNull();
assertThat(activeSession.getSession().getDescription()).isEqualTo(sessionDescription);
assertDataPersisted(sessionName, sessionDescription);
assertControlsState();
}
示例3: shouldOpenOnDoubleClick
import org.fest.swing.exception.WaitTimedOutError; //导入依赖的package包/类
@Test
public void shouldOpenOnDoubleClick() throws InterruptedException {
// when
editorFixture.menuItemWithPath("File", "Open session").click();
editorFixture.dialog().table().cell(TableCell.row(1).column(0)).doubleClick();
// then
try {
assertThat(editorFixture.dialog()).isNull();
} catch (WaitTimedOutError ex) {
}
assertOpen(TestSessionsData.SOME.getSessionNames()[1]);
}
示例4: shouldOpenOnOkClick
import org.fest.swing.exception.WaitTimedOutError; //导入依赖的package包/类
@Test
public void shouldOpenOnOkClick() throws InterruptedException {
// when
SystemTestSteps.openSession(editorFixture, 2);
// then
try {
assertThat(editorFixture.dialog()).isNull();
} catch (WaitTimedOutError ex) {
}
assertOpen(TestSessionsData.SOME.getSessionNames()[2]);
}