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


Java TestResult.passed方法代码示例

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

示例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");
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:32,代码来源:VncRecorderLifecycleManagerTest.java

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

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


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