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


Java SimpleReportEntry类代码示例

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


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

示例1: executeTestSet

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
private void executeTestSet( Class<?> clazz, RunListener reporter, Notifier notifier )
{
    final ReportEntry report = new SimpleReportEntry( getClass().getName(), clazz.getName() );
    reporter.testSetStarting( report );
    try
    {
        executeWithRerun( clazz, notifier );
    }
    catch ( Throwable e )
    {
        if ( isFailFast() && e instanceof StoppedByUserException )
        {
            String reason = e.getClass().getName();
            Description skippedTest = createDescription( clazz.getName(), createIgnored( reason ) );
            notifier.fireTestIgnored( skippedTest );
        }
        else
        {
            String reportName = report.getName();
            String reportSourceName = report.getSourceName();
            PojoStackTraceWriter stackWriter = new PojoStackTraceWriter( reportSourceName, reportName, e );
            reporter.testError( withException( reportSourceName, reportName, stackWriter ) );
        }
    }
    finally
    {
        reporter.testSetCompleted( report );
    }
}
 
开发者ID:play1-maven-plugin,项目名称:play1-maven-plugin,代码行数:30,代码来源:PlayJUnit4Provider.java

示例2: hookFail

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Override
public void hookFail(Hook hook, List<TestBlock> parents, Throwable cause) {
    ReporterSupport.filterStackTrace(cause);
    String fullDescription = ReporterSupport.getFullDescription(hook, parents);
    String className = hook.testClass.getCanonicalName();
    listener.testError(new SimpleReportEntry(className, fullDescription,
            new PojoStackTraceWriter(className, fullDescription, cause), 0));
}
 
开发者ID:cuppa-framework,项目名称:cuppa,代码行数:9,代码来源:CuppaSurefireReporter.java

示例3: testFail

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Override
public void testFail(Test test, List<TestBlock> parents, Throwable cause) {
    ReporterSupport.filterStackTrace(cause);
    String description = ReporterSupport.getFullDescription(test, parents);
    listener.testFailed(new SimpleReportEntry(test.testClass.getCanonicalName(), description,
            new PojoStackTraceWriter(test.testClass.getCanonicalName(), description, cause), 0));
}
 
开发者ID:cuppa-framework,项目名称:cuppa,代码行数:8,代码来源:CuppaSurefireReporter.java

示例4: start

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Override
public void start(TestBlock rootBlock) {
    listener.testSetStarting(new SimpleReportEntry(CuppaSurefireProvider.class.getName(), "Cuppa"));
}
 
开发者ID:cuppa-framework,项目名称:cuppa,代码行数:5,代码来源:CuppaSurefireReporter.java

示例5: end

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Override
public void end() {
    listener.testSetCompleted(new SimpleReportEntry(CuppaSurefireProvider.class.getName(), "Cuppa"));
}
 
开发者ID:cuppa-framework,项目名称:cuppa,代码行数:5,代码来源:CuppaSurefireReporter.java

示例6: testStart

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Override
public void testStart(Test test, List<TestBlock> parents) {
    listener.testStarting(new SimpleReportEntry(test.testClass.getCanonicalName(),
            ReporterSupport.getFullDescription(test, parents)));
}
 
开发者ID:cuppa-framework,项目名称:cuppa,代码行数:6,代码来源:CuppaSurefireReporter.java

示例7: testPass

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Override
public void testPass(Test test, List<TestBlock> parents) {
    listener.testSucceeded(new SimpleReportEntry(test.testClass.getCanonicalName(),
            ReporterSupport.getFullDescription(test, parents)));
}
 
开发者ID:cuppa-framework,项目名称:cuppa,代码行数:6,代码来源:CuppaSurefireReporter.java

示例8: testSkip

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Override
public void testSkip(Test test, List<TestBlock> parents) {
    listener.testSkipped(new SimpleReportEntry(test.testClass.getCanonicalName(),
            ReporterSupport.getFullDescription(test, parents)));
}
 
开发者ID:cuppa-framework,项目名称:cuppa,代码行数:6,代码来源:CuppaSurefireReporter.java

示例9: testNotifySetStartNull

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Test
public void testNotifySetStartNull() {
    listener.notifySetStart("name", null);
    Mockito.verify(rl).testSetStarting(
            Matchers.any(SimpleReportEntry.class));
}
 
开发者ID:powerunit,项目名称:powerunit,代码行数:7,代码来源:PowerUnitProviderListenerTests.java

示例10: testNotifySetEndNull

import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Test
public void testNotifySetEndNull() {
    listener.notifySetEnd("name", null);
    Mockito.verify(rl).testSetCompleted(
            Matchers.any(SimpleReportEntry.class));
}
 
开发者ID:powerunit,项目名称:powerunit,代码行数:7,代码来源:PowerUnitProviderListenerTests.java


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