本文整理汇总了Java中org.jboss.arquillian.test.spi.TestResult.passed方法的典型用法代码示例。如果您正苦于以下问题:Java TestResult.passed方法的具体用法?Java TestResult.passed怎么用?Java TestResult.passed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jboss.arquillian.test.spi.TestResult
的用法示例。
在下文中一共展示了TestResult.passed方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: should_verify_passed_result_for_test_method_report
import org.jboss.arquillian.test.spi.TestResult; //导入方法依赖的package包/类
@Test
public void should_verify_passed_result_for_test_method_report() throws ParseException {
ExceptionHandlingTestCase.TestException exception = new ExceptionHandlingTestCase.TestException("cause");
TestResult result = TestResult.passed();
result.setThrowable(exception);
TestMethodReport report = Reporter
.createReport(new TestMethodReport("Report name"))
.addEntries("entry")
.setResult(result)
.build();
verifyBasicContent(report);
TestMethodReportAssert
.assertThatTestMethodReport(report)
.hasFailureSubReportsContainingExactly()
.hasStatus(TestResult.Status.PASSED);
}
示例2: should_move_recording_video
import org.jboss.arquillian.test.spi.TestResult; //导入方法依赖的package包/类
@Test
public void should_move_recording_video() throws IOException, NoSuchMethodException {
final File destination = temporaryFolder.newFolder("destination");
final File video = temporaryFolder.newFile("file.flv");
Files.write(video.toPath(), "Hello".getBytes());
when(seleniumContainers.getVideoRecordingFile()).thenReturn(video.toPath());
when(after.getTestClass()).thenReturn(new TestClass(VncRecorderLifecycleManagerTest.class));
when(after.getTestMethod()).thenReturn(
VncRecorderLifecycleManagerTest.class.getMethod("should_move_recording_video"));
Map<String, String> conf = new HashMap<>();
conf.put("videoOutput", destination.getAbsolutePath());
TestResult testResult = TestResult.passed();
VncRecorderLifecycleManager vncRecorderLifecycleManager = new VncRecorderLifecycleManager();
vncRecorderLifecycleManager.vnc = cube;
vncRecorderLifecycleManager.afterVideoRecordedEvent = event;
vncRecorderLifecycleManager.stopRecording(after,
testResult,
CubeDroneConfiguration.fromMap(conf),
seleniumContainers
);
assertThat(new File(destination,
"org_arquillian_cube_docker_drone_VncRecorderLifecycleManagerTest_should_move_recording_video.flv"))
.exists()
.hasContent("Hello");
}
示例3: should_stop_vnc_by_default
import org.jboss.arquillian.test.spi.TestResult; //导入方法依赖的package包/类
@Test
public void should_stop_vnc_by_default() throws IOException, NoSuchMethodException {
final File destination = temporaryFolder.newFolder("destination");
final File video = temporaryFolder.newFile("file.flv");
when(seleniumContainers.getVideoRecordingFile()).thenReturn(video.toPath());
when(after.getTestClass()).thenReturn(new TestClass(VncRecorderLifecycleManagerTest.class));
when(after.getTestMethod()).thenReturn(
VncRecorderLifecycleManagerTest.class.getMethod("should_stop_vnc_by_default"));
Map<String, String> conf = new HashMap<>();
conf.put("videoOutput", destination.getAbsolutePath());
TestResult testResult = TestResult.passed();
VncRecorderLifecycleManager vncRecorderLifecycleManager = new VncRecorderLifecycleManager();
vncRecorderLifecycleManager.vnc = cube;
vncRecorderLifecycleManager.afterVideoRecordedEvent = event;
vncRecorderLifecycleManager.stopRecording(after,
testResult,
CubeDroneConfiguration.fromMap(conf),
seleniumContainers
);
verify(cube).stop();
verify(cube).destroy();
}
示例4: should_discard_recording_if_configured_in_only_failing_and_passed_test
import org.jboss.arquillian.test.spi.TestResult; //导入方法依赖的package包/类
@Test
public void should_discard_recording_if_configured_in_only_failing_and_passed_test()
throws IOException, NoSuchMethodException {
final File destination = temporaryFolder.newFolder("destination");
final File video = temporaryFolder.newFile("file.flv");
when(seleniumContainers.getVideoRecordingFile()).thenReturn(video.toPath());
when(after.getTestClass()).thenReturn(new TestClass(VncRecorderLifecycleManagerTest.class));
when(after.getTestMethod()).thenReturn(VncRecorderLifecycleManagerTest.class.getMethod(
"should_discard_recording_if_configured_in_only_failing_and_passed_test"));
Map<String, String> conf = new HashMap<>();
conf.put("videoOutput", destination.getAbsolutePath());
conf.put("recordingMode", "ONLY_FAILING");
TestResult testResult = TestResult.passed();
VncRecorderLifecycleManager vncRecorderLifecycleManager = new VncRecorderLifecycleManager();
vncRecorderLifecycleManager.vnc = cube;
vncRecorderLifecycleManager.afterVideoRecordedEvent = event;
vncRecorderLifecycleManager.stopRecording(after,
testResult,
CubeDroneConfiguration.fromMap(conf),
seleniumContainers
);
assertThat(new File(destination,
"org_arquillian_cube_docker_drone_VncRecorderLifecycleManagerTest_should_discard_recording_if_configured_in_only_failing_and_passed_test.flv"))
.doesNotExist();
}