Search in sources :

Example 1 with Resources

use of org.jacoco.report.internal.html.resources.Resources in project jacoco by jacoco.

the class PageTestBase method setup.

protected void setup() throws Exception {
    output = new MemoryMultiReportOutput();
    rootFolder = new ReportOutputFolder(output);
    final Resources resources = new Resources(rootFolder);
    final Table table = new Table();
    table.add("Element", null, new LabelColumn(), true);
    context = new IHTMLReportContext() {

        public ILanguageNames getLanguageNames() {
            return new JavaNames();
        }

        public Resources getResources() {
            return resources;
        }

        public Table getTable() {
            return table;
        }

        public String getFooterText() {
            return "CustomFooter";
        }

        public ILinkable getSessionsPage() {
            return new LinkableStub("sessions.html", "Sessions", Styles.EL_SESSION);
        }

        public String getOutputEncoding() {
            return "UTF-8";
        }

        public IIndexUpdate getIndexUpdate() {
            return new IIndexUpdate() {

                public void addClass(ILinkable link, long classid) {
                }
            };
        }

        public Locale getLocale() {
            return Locale.ENGLISH;
        }
    };
    support = new HTMLSupport();
}
Also used : ReportOutputFolder(org.jacoco.report.internal.ReportOutputFolder) Locale(java.util.Locale) HTMLSupport(org.jacoco.report.internal.html.HTMLSupport) IIndexUpdate(org.jacoco.report.internal.html.index.IIndexUpdate) Table(org.jacoco.report.internal.html.table.Table) LinkableStub(org.jacoco.report.internal.html.LinkableStub) LabelColumn(org.jacoco.report.internal.html.table.LabelColumn) ILinkable(org.jacoco.report.internal.html.ILinkable) ILanguageNames(org.jacoco.report.ILanguageNames) MemoryMultiReportOutput(org.jacoco.report.MemoryMultiReportOutput) Resources(org.jacoco.report.internal.html.resources.Resources) IHTMLReportContext(org.jacoco.report.internal.html.IHTMLReportContext) JavaNames(org.jacoco.report.JavaNames)

Example 2 with Resources

use of org.jacoco.report.internal.html.resources.Resources in project jacoco by jacoco.

the class BarColumnTest 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 BarColumn(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 3 with Resources

use of org.jacoco.report.internal.html.resources.Resources in project jacoco by jacoco.

the class CounterColumnTest 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();
    locale = 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 4 with Resources

use of org.jacoco.report.internal.html.resources.Resources 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 5 with Resources

use of org.jacoco.report.internal.html.resources.Resources 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)

Aggregations

ReportOutputFolder (org.jacoco.report.internal.ReportOutputFolder)7 Resources (org.jacoco.report.internal.html.resources.Resources)7 MemoryMultiReportOutput (org.jacoco.report.MemoryMultiReportOutput)6 HTMLDocument (org.jacoco.report.internal.html.HTMLDocument)5 HTMLSupport (org.jacoco.report.internal.html.HTMLSupport)5 Before (org.junit.Before)5 Collection (java.util.Collection)1 List (java.util.List)1 Locale (java.util.Locale)1 IBundleCoverage (org.jacoco.core.analysis.IBundleCoverage)1 ILanguageNames (org.jacoco.report.ILanguageNames)1 IReportVisitor (org.jacoco.report.IReportVisitor)1 ISourceFileLocator (org.jacoco.report.ISourceFileLocator)1 JavaNames (org.jacoco.report.JavaNames)1 HTMLGroupVisitor (org.jacoco.report.internal.html.HTMLGroupVisitor)1 IHTMLReportContext (org.jacoco.report.internal.html.IHTMLReportContext)1 ILinkable (org.jacoco.report.internal.html.ILinkable)1 LinkableStub (org.jacoco.report.internal.html.LinkableStub)1 ElementIndex (org.jacoco.report.internal.html.index.ElementIndex)1 IIndexUpdate (org.jacoco.report.internal.html.index.IIndexUpdate)1