微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

org.junit.platform.engine.reporting.ReportEntry的实例源码

项目:jqwik    文件CheckedProperty.java   
public PropertyCheckResult check(Consumer<ReportEntry> publisher) {
    long effectiveSeed = configuration.getSeed() == Property.SEED_NOT_SET ? RNG.get().nextLong() : configuration.getSeed();
    PropertyConfiguration effectiveConfiguration = configuration.withSeed(effectiveSeed);
    try {
        return createGenericproperty().check(effectiveConfiguration,publisher);
    } catch (CannotFindArbitraryException cannotFindArbitraryException) {
        return PropertyCheckResult.erroneous(effectiveConfiguration.getStereotype(),propertyName,effectiveConfiguration.getSeed(),Collections.emptyList(),cannotFindArbitraryException);
    }
}
项目:jqwik    文件PropertyMethodExecutor.java   
private TestExecutionResult executeMethod(Object testInstance,EngineExecutionListener listener) {
    try {
        Consumer<ReportEntry> reporter = (ReportEntry entry) -> listener.reportingEntryPublished(methodDescriptor,entry);
        PropertyCheckResult propertyExecutionResult = executeProperty(testInstance,reporter);
        TestExecutionResult testExecutionResult = createTestExecutionResult(propertyExecutionResult);
        return testExecutionResult;
    } catch (TestAbortedException e) {
        return aborted(e);
    } catch (Throwable t) {
        rethrowIfBlacklisted(t);
        return Failed(t);
    }
}
项目:jqwik    文件CheckResultReportEntry.java   
public static ReportEntry from(PropertyCheckResult checkResult) {
    Map<String,String> entries = new HashMap<>();
    entries.put(SEED_REPORT_KEY,Long.toString(checkResult.randomSeed()));
    entries.put(TRIES_REPORT_KEY,Integer.toString(checkResult.countTries()));
    entries.put(CHECKS_REPORT_KEY,Integer.toString(checkResult.countChecks()));
    checkResult.sample().ifPresent(sample -> {
        if (!sample.isEmpty())
            entries.put(SAMPLE_REPORT_KEY,JqwikStringSupport.displayString(sample));
    });
    checkResult.originalSample().ifPresent(sample -> {
        if (!sample.isEmpty())
            entries.put(ORIGINAL_SAMPLE_REPORT_KEY,JqwikStringSupport.displayString(sample));
    });
    return ReportEntry.from(entries);
}
项目:junit-extensions    文件RecordingExecutionListener.java   
@Override
public void reportingEntryPublished(TestDescriptor testDescriptor,ReportEntry entry) {
  addEvent(ExecutionEvent.reportingEntryPublished(testDescriptor,entry));
}
项目:junit-extensions    文件ExecutionEvent.java   
public static ExecutionEvent reportingEntryPublished(
    TestDescriptor testDescriptor,ReportEntry entry) {
  return new ExecutionEvent(REPORTING_ENTRY_PUBLISHED,testDescriptor,entry);
}
项目:jqwik    文件PropertyMethodExecutor.java   
private PropertyCheckResult executeProperty(Object testInstance,Consumer<ReportEntry> publisher) {
    CheckedProperty property = checkedPropertyFactory.fromDescriptor(methodDescriptor,testInstance);
    return property.check(publisher);
}
项目:junit-pioneer    文件ExecutionEvent.java   
public static ExecutionEvent reportingEntryPublished(TestDescriptor testDescriptor,ReportEntry entry) {
    return new ExecutionEvent(REPORTING_ENTRY_PUBLISHED,entry);
}
项目:junit-pioneer    文件ExecutionEventRecorder.java   
@Override
public void reportingEntryPublished(TestDescriptor testDescriptor,ReportEntry entry) {
    addEvent(ExecutionEvent.reportingEntryPublished(testDescriptor,entry));
}
项目:junit5-docker    文件JupiterExecutionListener.java   
@Override
public void reportingEntryPublished(TestDescriptor testDescriptor,ReportEntry reportEntry) {

}
项目:webtester2-core    文件TestClassExecutor.java   
@Override
public void reportingEntryPublished(TestDescriptor testDescriptor,ReportEntry entry) {

}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。