Package org.jacoco.core.analysis

Examples of org.jacoco.core.analysis.CoverageNodeImpl


      }
    };
  }

  private CoverageNodeImpl createNode(final int missed, final int covered) {
    return new CoverageNodeImpl(ElementType.GROUP, "Foo") {
      {
        this.lineCounter = CounterImpl.getInstance(missed, covered);
      }
    };
  }
View Full Code Here


  }

  @Test
  public void testFooter() throws Exception {
    column.footer(tr,
        new CoverageNodeImpl(ElementType.GROUP, "Foo", false),
        resources, root);
    doc.close();
    final Document doc = support.parse(output.getFile("Test.html"));
    assertEquals("Total", support.findStr(doc,
        "/html/body/table/tr/td/text()"));
View Full Code Here

    assertEquals("el_group", support.findStr(doc,
        "/html/body/table/tr/td/a/@class"));
  }

  private ICoverageTableItem createItem(final String name, final String link) {
    final ICoverageNode node = new CoverageNodeImpl(ElementType.GROUP,
        name, false);
    return new ICoverageTableItem() {
      public String getLabel() {
        return name;
      }
View Full Code Here

    assertEquals("E",
        support.findStr(doc, "/html/body/table/tbody/tr[5]/td[1]"));
  }

  private ITableItem createItem(final String name, final int count) {
    final ICoverageNode node = new CoverageNodeImpl(ElementType.GROUP, name) {
      {
        this.classCounter = CounterImpl.getInstance(count, 0);
      }
    };
    return new ITableItem() {
      public String getLinkLabel() {
        return name;
      }

      public String getLink(ReportOutputFolder base) {
        return name + ".html";
      }

      public String getLinkStyle() {
        return Resources.getElementStyle(node.getElementType());
      }

      public ICoverageNode getNode() {
        return node;
      }
View Full Code Here

      }
    };
  }

  private ICoverageNode createTotal(final String name, final int count) {
    return new CoverageNodeImpl(ElementType.GROUP, name) {
      {
        this.classCounter = CounterImpl.getInstance(count, 0);
      }
    };
  }
View Full Code Here

      }
    };
  }

  private CoverageNodeImpl createNode(final int total, final int covered) {
    return new CoverageNodeImpl(ElementType.GROUP, "Foo", false) {
      {
        this.lineCounter = CounterImpl.getInstance(total, covered);
      }
    };
  }
View Full Code Here

  public void testVisitChild() {
    final SourceFileCoverage node = new SourceFileCoverage(
        "SourceFilePageTest.java", "org/jacoco/report/html");
    final SourceFilePage page = new SourceFilePage(node, null, root,
        context);
    page.visitChild(new CoverageNodeImpl(ElementType.CLASS, "Foo", false));
  }
View Full Code Here

  }

  private void createReport(final GroupElement group,
      final IReportFormatter formatter,
      final ExecutionDataStore executionData) throws IOException {
    final CoverageNodeImpl node = createNode(group, executionData);
    final IReportVisitor visitor = formatter.createReportVisitor(node);
    final SourceFileCollection sourceFileLocator = new SourceFileCollection(
        group.sourcefiles);
    if (node instanceof BundleCoverage) {
      visitBundle(visitor, (BundleCoverage) node, sourceFileLocator);
View Full Code Here

  private void createReport(final GroupElement group,
      final IReportVisitor parentVisitor,
      final CoverageNodeImpl parentNode,
      final ExecutionDataStore executionData) throws IOException {
    final CoverageNodeImpl node = createNode(group, executionData);
    final IReportVisitor visitor = parentVisitor.visitChild(node);
    final SourceFileCollection sourceFileLocator = new SourceFileCollection(
        group.sourcefiles);
    if (node instanceof BundleCoverage) {
      visitBundle(visitor, (BundleCoverage) node, sourceFileLocator);
View Full Code Here

      final ExecutionDataStore executionData) throws IOException {
    if (group.name == null) {
      throw new BuildException("Group name must be supplied");
    }
    if (group.children.size() > 0) {
      return new CoverageNodeImpl(ElementType.GROUP, group.name, false);
    } else {
      final CoverageBuilder builder = new CoverageBuilder(executionData);
      final Analyzer analyzer = new Analyzer(builder);
      for (final Iterator<?> i = group.classfiles.iterator(); i.hasNext();) {
        final Resource resource = (Resource) i.next();
View Full Code Here

TOP

Related Classes of org.jacoco.core.analysis.CoverageNodeImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.