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


Java WaitTimedOutError类代码示例

本文整理汇总了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();
}
 
开发者ID:mnikliborc,项目名称:clicktrace,代码行数:26,代码来源:NewSessionTest.java

示例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();
}
 
开发者ID:mnikliborc,项目名称:clicktrace,代码行数:27,代码来源:NewSessionTest.java

示例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]);
}
 
开发者ID:mnikliborc,项目名称:clicktrace,代码行数:15,代码来源:OpenSessionTest.java

示例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]);
}
 
开发者ID:mnikliborc,项目名称:clicktrace,代码行数:14,代码来源:OpenSessionTest.java


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