本文整理汇总了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 );
}
}
示例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));
}
示例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));
}
示例4: start
import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Override
public void start(TestBlock rootBlock) {
listener.testSetStarting(new SimpleReportEntry(CuppaSurefireProvider.class.getName(), "Cuppa"));
}
示例5: end
import org.apache.maven.surefire.report.SimpleReportEntry; //导入依赖的package包/类
@Override
public void end() {
listener.testSetCompleted(new SimpleReportEntry(CuppaSurefireProvider.class.getName(), "Cuppa"));
}
示例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)));
}
示例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)));
}
示例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)));
}
示例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));
}
示例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));
}