Search in sources :

Example 6 with ReportOutputFolder

use of org.jacoco.report.internal.ReportOutputFolder in project jacoco by jacoco.

the class LabelColumnTest method setup.

@Before
public void setup() throws Exception {
    output = new MemoryMultiReportOutput();
    root = new ReportOutputFolder(output);
    resources = new Resources(root);
    doc = new HTMLDocument(root.createFile("Test.html"), "UTF-8");
    doc.head().title();
    td = doc.body().table("somestyle").tr().td();
    support = new HTMLSupport();
    column = new LabelColumn();
}
Also used : ReportOutputFolder(org.jacoco.report.internal.ReportOutputFolder) HTMLSupport(org.jacoco.report.internal.html.HTMLSupport) MemoryMultiReportOutput(org.jacoco.report.MemoryMultiReportOutput) HTMLDocument(org.jacoco.report.internal.html.HTMLDocument) Resources(org.jacoco.report.internal.html.resources.Resources) Before(org.junit.Before)

Example 7 with ReportOutputFolder

use of org.jacoco.report.internal.ReportOutputFolder in project jacoco by jacoco.

the class PercentageColumnTest method setup.

@Before
public void setup() throws Exception {
    output = new MemoryMultiReportOutput();
    root = new ReportOutputFolder(output);
    resources = new Resources(root);
    doc = new HTMLDocument(root.createFile("Test.html"), "UTF-8");
    doc.head().title();
    td = doc.body().table("somestyle").tr().td();
    support = new HTMLSupport();
    column = new PercentageColumn(CounterEntity.LINE, Locale.ENGLISH);
}
Also used : ReportOutputFolder(org.jacoco.report.internal.ReportOutputFolder) HTMLSupport(org.jacoco.report.internal.html.HTMLSupport) MemoryMultiReportOutput(org.jacoco.report.MemoryMultiReportOutput) HTMLDocument(org.jacoco.report.internal.html.HTMLDocument) Resources(org.jacoco.report.internal.html.resources.Resources) Before(org.junit.Before)

Example 8 with ReportOutputFolder

use of org.jacoco.report.internal.ReportOutputFolder in project jacoco by jacoco.

the class TableTest method setup.

@Before
public void setup() throws IOException {
    output = new MemoryMultiReportOutput();
    root = new ReportOutputFolder(output);
    resources = new Resources(root);
    doc = new HTMLDocument(root.createFile("Test.html"), "UTF-8");
    doc.head().title();
    body = doc.body();
    table = new Table();
}
Also used : ReportOutputFolder(org.jacoco.report.internal.ReportOutputFolder) MemoryMultiReportOutput(org.jacoco.report.MemoryMultiReportOutput) HTMLDocument(org.jacoco.report.internal.html.HTMLDocument) Resources(org.jacoco.report.internal.html.resources.Resources) Before(org.junit.Before)

Example 9 with ReportOutputFolder

use of org.jacoco.report.internal.ReportOutputFolder in project jacoco by jacoco.

the class PackageSourcePageTest method setup.

@Before
@Override
public void setup() throws Exception {
    super.setup();
    ISourceFileCoverage src1 = new SourceFileCoverageImpl("Src1.java", "org/jacoco/example");
    ISourceFileCoverage src2 = new SourceFileCoverageImpl("Src2.java", "org/jacoco/example");
    node = new PackageCoverageImpl("org/jacoco/example", Collections.<IClassCoverage>emptyList(), Arrays.asList(src1, src2));
    sourceLocator = new ISourceFileLocator() {

        public int getTabWidth() {
            return 4;
        }

        public Reader getSourceFile(String packageName, String fileName) throws IOException {
            return fileName.equals("Src1.java") ? new StringReader("") : null;
        }
    };
    packagePageLink = new ILinkable() {

        public String getLinkStyle() {
            fail();
            return null;
        }

        public String getLinkLabel() {
            fail();
            return null;
        }

        public String getLink(ReportOutputFolder base) {
            return "index.html";
        }
    };
}
Also used : ReportOutputFolder(org.jacoco.report.internal.ReportOutputFolder) ISourceFileCoverage(org.jacoco.core.analysis.ISourceFileCoverage) PackageCoverageImpl(org.jacoco.core.internal.analysis.PackageCoverageImpl) IClassCoverage(org.jacoco.core.analysis.IClassCoverage) StringReader(java.io.StringReader) Reader(java.io.Reader) StringReader(java.io.StringReader) IOException(java.io.IOException) ILinkable(org.jacoco.report.internal.html.ILinkable) ISourceFileLocator(org.jacoco.report.ISourceFileLocator) SourceFileCoverageImpl(org.jacoco.core.internal.analysis.SourceFileCoverageImpl) Before(org.junit.Before)

Example 10 with ReportOutputFolder

use of org.jacoco.report.internal.ReportOutputFolder in project jacoco by jacoco.

the class ResourcesTest method setup.

@Before
public void setup() {
    output = new MemoryMultiReportOutput();
    root = new ReportOutputFolder(output);
    resources = new Resources(root);
}
Also used : ReportOutputFolder(org.jacoco.report.internal.ReportOutputFolder) MemoryMultiReportOutput(org.jacoco.report.MemoryMultiReportOutput) Before(org.junit.Before)

Aggregations

ReportOutputFolder (org.jacoco.report.internal.ReportOutputFolder)11 MemoryMultiReportOutput (org.jacoco.report.MemoryMultiReportOutput)7 Resources (org.jacoco.report.internal.html.resources.Resources)7 Before (org.junit.Before)7 HTMLDocument (org.jacoco.report.internal.html.HTMLDocument)5 HTMLSupport (org.jacoco.report.internal.html.HTMLSupport)5 ISourceFileLocator (org.jacoco.report.ISourceFileLocator)2 ILinkable (org.jacoco.report.internal.html.ILinkable)2 Test (org.junit.Test)2 IOException (java.io.IOException)1 Reader (java.io.Reader)1 StringReader (java.io.StringReader)1 Collection (java.util.Collection)1 List (java.util.List)1 Locale (java.util.Locale)1 IBundleCoverage (org.jacoco.core.analysis.IBundleCoverage)1 IClassCoverage (org.jacoco.core.analysis.IClassCoverage)1 ISourceFileCoverage (org.jacoco.core.analysis.ISourceFileCoverage)1 PackageCoverageImpl (org.jacoco.core.internal.analysis.PackageCoverageImpl)1 SourceFileCoverageImpl (org.jacoco.core.internal.analysis.SourceFileCoverageImpl)1