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


Java Report类代码示例

本文整理汇总了Java中org.arquillian.reporter.api.model.report.Report的典型用法代码示例。如果您正苦于以下问题:Java Report类的具体用法?Java Report怎么用?Java Report使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Report类属于org.arquillian.reporter.api.model.report包,在下文中一共展示了Report类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: verify_test_suite_configuration_report_exists_with_contents

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
@Test
public void verify_test_suite_configuration_report_exists_with_contents() {
    ConfigurationReport configuration = executionReport.getTestSuiteReports().get(0).getConfiguration();
    List<Report> subReports = configuration.getSubReports();

    assertThatReport(configuration)
        .hasName(ReporterCoreKey.GENERAL_TEST_SUITE_CONFIGURATION_REPORT)
        .hasNumberOfEntries(0)
        .hasNumberOfSubReports(2);

    for (Report subReport : subReports) {
        if (isContainerConfigurationSubReport(subReport)) {
            verify_container_configuration_sub_report(subReport);
        }
        if (isEnvironmentConfigurationSubReport(subReport)) {
            verify_environment_configuration_sub_report(subReport);
        }
    }
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:20,代码来源:GreeterReportVerifier.java

示例2: verify_container_configuration_sub_report

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
private void verify_container_configuration_sub_report(Report subReport) {
    Report nestedContainerReport = (Report) subReport.getSubReports().get(0);
    Report nestedContainerConfigurationReport = (Report) nestedContainerReport.getSubReports().get(0);

    assertThat(subReport.getName())
        .isEqualTo(new UnknownStringKey("containers"));
    assertThat(subReport.getEntries()).size().isEqualTo(0);
    assertThat(subReport.getSubReports()).size().isEqualTo(1);
    assertThatReport(nestedContainerReport)
        .hasName(ArquillianCoreKey.CONTAINER_REPORT)
        .hasNumberOfEntries(1)
        .hasEntriesContaining(new KeyValueEntry(ArquillianCoreKey.CONTAINER_NAME, "chameleon"))
        .hasNumberOfSubReports(1);
    assertThatReport(nestedContainerConfigurationReport)
        .hasName(ArquillianCoreKey.CONTAINER_CONFIGURATION_REPORT)
        .hasNumberOfEntries(2)
        .hasNumberOfSubReports(0);
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:19,代码来源:GreeterReportVerifier.java

示例3: verify_deployment_configuration_sub_report

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
private void verify_deployment_configuration_sub_report(Report deploymentReport) {
    Report nestedDeploymentReport = (Report) deploymentReport.getSubReports().get(0);

    assertThat(deploymentReport.getName())
        .isEqualTo(new UnknownStringKey("deployments"));
    assertThat(deploymentReport.getEntries()).size().isEqualTo(0);
    assertThat(deploymentReport.getSubReports()).size().isEqualTo(1);

    assertThatReport(nestedDeploymentReport)
        .hasName(ArquillianCoreKey.DEPLOYMENT_IN_TEST_CLASS_REPORT)
        .hasNumberOfEntries(4)
        .hasEntriesContaining(new KeyValueEntry(ArquillianCoreKey.ARCHIVE_NAME_OF_DEPLOYMENT, "greeterArchive.jar"),
            new KeyValueEntry(ArquillianCoreKey.DEPLOYMENT_IN_TEST_CLASS_NAME, "_DEFAULT_"),
            new KeyValueEntry(ArquillianCoreKey.ORDER_OF_DEPLOYMENT, "-1"),
            new KeyValueEntry(ArquillianCoreKey.PROTOCOL_USED_FOR_DEPLOYMENT, "_DEFAULT_"))
        .hasNumberOfSubReports(0);
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:18,代码来源:GreeterReportVerifier.java

示例4: setDefaultValues

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
private Report setDefaultValues(Report report, JsonObject jsonReport) {
    JsonElement name = jsonReport.get("name");
    JsonArray entries = jsonReport.get("entries").getAsJsonArray();
    JsonArray subReports = jsonReport.get("subReports").getAsJsonArray();

    report.setName(prepareGsonParser().fromJson(name, StringKey.class));


    entries.forEach(subEntry -> {
        Entry entry = prepareGsonParser().fromJson(subEntry, Entry.class);
        report.getEntries().add(entry);
    });

    subReports.forEach(subReport -> {
        Report subReportEntry = prepareGsonParser().fromJson(subReport, Report.class);
        report.getSubReports().add(subReportEntry);
    });

    return report;
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:21,代码来源:ReportJsonDeserializer.java

示例5: prepareGsonParser

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
public static Gson prepareGsonParser(){
    if (gson == null) {
        gson = new GsonBuilder()
            .registerTypeAdapter(StringKey.class, new StringKeyJsonDeserializer())
            .registerTypeAdapter(Entry.class, new EntryJsonDeserializer())
            .registerTypeAdapter(KeyValueEntry.class, new EntryJsonDeserializer())
            .registerTypeAdapter(AbstractStringKey.class, new StringKeyJsonDeserializer())
            .registerTypeAdapter(Report.class, new ReportJsonDeserializer())
            .registerTypeAdapter(TestMethodReport.class, new ReportJsonDeserializer())
            .registerTypeAdapter(ExecutionReport.class, new ReportJsonDeserializer())
            .registerTypeAdapter(TestClassReport.class, new ReportJsonDeserializer())
            .registerTypeAdapter(ConfigurationReport.class, new ReportJsonDeserializer())
            .registerTypeAdapter(FailureReport.class, new ReportJsonDeserializer())
            .registerTypeAdapter(TestSuiteReport.class, new ReportJsonDeserializer())
            .registerTypeAdapter(AbstractReport.class,  new ReportJsonDeserializer())
            .create();
    }
    return gson;
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:20,代码来源:ReportJsonParser.java

示例6: verifyNonExistingSectionAddedAndGetReport

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
protected <T extends Report> T verifyNonExistingSectionAddedAndGetReport(
    SectionTree parentTree,
    SectionEvent expectedSubsection,
    List<T> reportsToFilter,
    int expectedSubtreesNum,
    int expectedAllTreeNodesNum) {

    SectionTree sectionTree =
        verifyNonExistingSuiteSectionAddedAndGetTree(parentTree, expectedSubsection, expectedSubtreesNum,
                                                     expectedAllTreeNodesNum);

    return reportsToFilter
        .stream()
        .filter(section -> section.equals(sectionTree.getAssociatedReport()))
        .findFirst()
        .get();
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:18,代码来源:AbstractNonExistingTreeSectionTest.java

示例7: reportSubtreeConsistOfGeneratedReports

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
/**
 * Go through the whole reporter subtree (all sub-reports regardless their type - eg. also ConfigurationReport for FailureReport)
 * according to the given set of report types. This tells which reports should be verified for their presence.
 * To verify both config and failure reports provide this set:
 * <p>
 * ConfigurationReport.class, FailureReport.class
 * </p>
 * When the report types are matched it checks that it contains only generated sub-reports and entries, except for
 * the given set of merged reports. It is also checked that all given merged reports are contained in the report tree
 */
public TestMethodReportAssert reportSubtreeConsistOfGeneratedReports(
    String parentSectionTestSuiteName,
    String parentSectionTestMethodName,
    ArrayList<Report> merged,
    Class<? extends Report>... reportTypes) {

    List<Class<? extends Report>> types = Arrays.asList(reportTypes);

    String testMethodNameSuffix =
        getTestMethodNameSuffix(parentSectionTestMethodName, parentSectionTestSuiteName);

    // check if ConfigurationReport of the actual test method report should be verified
    if (shouldBeVerified(ConfigurationReport.class, TestMethodReport.class, types)) {
        verifyConfigReports(actual.getConfiguration(), testMethodNameSuffix, merged);
    }

    // check if FailureReport of the actual test method report should be verified
    if (shouldBeVerified(FailureReport.class, null, types)) {
        verifyFailureReports(actual.getFailureReport(), testMethodNameSuffix, merged);
    }

    return this;
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:34,代码来源:TestMethodReportAssert.java

示例8: verifyConfigReports

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
protected void verifyConfigReports(ConfigurationReport configuration, String nameSuffix, List<Report> merged) {
    // check the expected number of configuration reports - should be same as the number of generated sections
    assertThatReport(configuration)
        .as("Configuration report should contain an exact number of test config sub-reports")
        .hasNumberOfSubReports(EXPECTED_NUMBER_OF_SECTIONS);

    // for each configuration sub-report
    IntStream.range(0, EXPECTED_NUMBER_OF_SECTIONS).forEach(index -> {
        Report reportOnIndex = configuration.getSubReports().get(index);

        defaultCheckOfIfMergedOrContainsGeneratedSubReports(merged, index, reportOnIndex);

        assertThatReport(reportOnIndex)
            .as("The config report should have same name that was generated for the index <%s> ", index)
            .hasName(getConfigReportName(index, nameSuffix));
    });
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:18,代码来源:WithConfigReportAssert.java

示例9: should_report_docker_info

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
@Test
public void should_report_docker_info() {

    createTakeDockerEnvironmentAndreportDockerEnvironment();

    verify(reportEvent).fire(reportEventArgumentCaptor.capture());
    final SectionEvent sectionEvent = reportEventArgumentCaptor.getValue();

    assertThatSection(sectionEvent)
            .hasSectionId(Standalone.getStandaloneId())
            .hasReportOfTypeThatIsAssignableFrom(BasicReport.class);

    final Report report = sectionEvent.getReport();

    final List<Report> subReports = report.getSubReports();
    assertThatReport(subReports.get(0))
            .hasName(DOCKER_HOST_INFORMATION)
            .hasNumberOfEntries(5)
            .hasEntriesContaining(
                    new KeyValueEntry(DOCKER_VERSION, "1.1.0"),
                    new KeyValueEntry(DOCKER_OS, "linux"),
                    new KeyValueEntry(DOCKER_KERNEL, "3.1.0"),
                    new KeyValueEntry(DOCKER_API_VERSION, "1.12"),
                    new KeyValueEntry(DOCKER_ARCH, "x86"));
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:26,代码来源:TakeDockerEnvironmentTest.java

示例10: should_report_schema_of_docker_composition_and_network_topology

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
@Test
public void should_report_schema_of_docker_composition_and_network_topology() {

    createTakeDockerEnvironmentAndreportDockerEnvironment();

    verify(reportEvent).fire(reportEventArgumentCaptor.capture());
    final SectionEvent sectionEvent = reportEventArgumentCaptor.getValue();

    assertThatSection(sectionEvent)
            .hasSectionId(Standalone.getStandaloneId())
            .hasReportOfTypeThatIsAssignableFrom(BasicReport.class);

    final Report report = sectionEvent.getReport();

    assertThatReport(report)
            .hasName(DOCKER_ENVIRONMENT)
            .hasNumberOfSubReports(1)
            .hasEntriesContaining(
                    new KeyValueEntry(DOCKER_COMPOSITION_SCHEMA, new FileEntry("reports/schemas/docker_composition.png")),
                    new KeyValueEntry(NETWORK_TOPOLOGY_SCHEMA, new FileEntry("reports/networks/docker_network_topology.png")));
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:22,代码来源:TakeDockerEnvironmentTest.java

示例11: should_report_log_file

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
@Test
public void should_report_log_file() throws IOException {
    final TakeDockerEnvironment takeDockerEnvironment = new TakeDockerEnvironment();
    takeDockerEnvironment.reportEvent = reportEvent;

    takeDockerEnvironment.reportContainerLogs(new BeforeStop(CUBE_ID), dockerClientExecutor, getReporterConfiguration());

    verify(reportEvent).fire(reportEventArgumentCaptor.capture());
    final SectionEvent sectionEvent = reportEventArgumentCaptor.getValue();

    assertThatSection(sectionEvent)
            .hasSectionId(CUBE_ID)
            .hasReportOfTypeThatIsAssignableFrom(BasicReport.class);

    final Report report = sectionEvent.getReport();

    assertThatReport(report)
            .hasNumberOfEntries(1)
            .hasEntriesContaining(new KeyValueEntry(LOG_PATH, new FileEntry("reports/logs/tomcat.log")));
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:21,代码来源:TakeDockerEnvironmentTest.java

示例12: verify_environment_configuration_sub_report

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
private void verify_environment_configuration_sub_report(Report subReport) {
    assertThat(subReport.getName())
        .isEqualTo(EnvironmentKey.ENVIRONMENT_SECTION_NAME);
    assertThat(subReport.getEntries()).size().isEqualTo(8);
    assertThatReport(subReport)
        .hasEntriesContaining(new KeyValueEntry(EnvironmentKey.JAVA_VERSION, System.getProperty("java.version")),
            new KeyValueEntry(EnvironmentKey.TEST_RUNNER, TestRunnerDetector.detect().name()),
            new KeyValueEntry(EnvironmentKey.TIMEZONE, TimeZone.getDefault().getDisplayName()),
            new KeyValueEntry(EnvironmentKey.CHARSET, Charset.defaultCharset().displayName()),
            new KeyValueEntry(EnvironmentKey.DOCKER, Boolean.toString(DockerDetector.detect())),
            new KeyValueEntry(EnvironmentKey.OPERATIVE_SYSTEM, System.getProperty("os.name")),
            new KeyValueEntry(EnvironmentKey.OPERATIVE_SYSTEM_ARCH, System.getProperty("os.arch")),
            new KeyValueEntry(EnvironmentKey.OPERATIVE_SYSTEM_VERSION, System.getProperty("os.version")));
    assertThat(subReport.getSubReports()).size().isEqualTo(0);
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:16,代码来源:GreeterReportVerifier.java

示例13: isEnvironmentConfigurationSubReport

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
private boolean isEnvironmentConfigurationSubReport(Report subReport) {
    StringKey subReportName = EnvironmentKey.ENVIRONMENT_SECTION_NAME;
    if (subReport.getName().equals(subReportName)) {
        return true;
    }
    return false;
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:8,代码来源:GreeterReportVerifier.java

示例14: isContainerConfigurationSubReport

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
private boolean isContainerConfigurationSubReport(Report subReport) {
    StringKey subReportName = new UnknownStringKey("containers");
    if (subReport.getName().equals(subReportName)) {
        return true;
    }
    return false;
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:8,代码来源:GreeterReportVerifier.java

示例15: verify_test_class_configuration_report_exists_with_contents

import org.arquillian.reporter.api.model.report.Report; //导入依赖的package包/类
@Test
public void verify_test_class_configuration_report_exists_with_contents() {
    List<TestClassReport> testClassReports = executionReport.getTestSuiteReports().get(0).getTestClassReports();
    TestClassReport testClassReport = testClassReports.get(0);
    ConfigurationReport configurationReport = testClassReport.getConfiguration();
    Report deploymentReport = configurationReport.getSubReports().get(0);

    assertThatReport(configurationReport)
        .hasName(ReporterCoreKey.GENERAL_TEST_CLASS_CONFIGURATION_REPORT)
        .hasNumberOfEntries(0)
        .hasNumberOfSubReports(1);

    verify_deployment_configuration_sub_report(deploymentReport);
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:15,代码来源:GreeterReportVerifier.java


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