Package org.jacoco.core.analysis

Examples of org.jacoco.core.analysis.CoverageNodeImpl


    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

    doc.close();
  }

  @Test
  public void testFooter() throws Exception {
    column.footer(td, new CoverageNodeImpl(ElementType.GROUP, "Foo"),
        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

    assertTrue(column.getComparator().compare(i2, i1) > 0);
    doc.close();
  }

  private ITableItem createItem(final String name, final String link) {
    final ICoverageNode node = new CoverageNodeImpl(ElementType.GROUP, name);
    return new ITableItem() {
      public String getLinkLabel() {
        return name;
      }

      public String getLink(ReportOutputFolder base) {
        return link;
      }

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

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

      }
    };
  }

  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

    fragmentroots.add(fragmentroot);
    getProjectCoverage(fragmentroot.getJavaProject()).increment(coverage);
  }

  private CoverageNodeImpl getProjectCoverage(IJavaProject project) {
    CoverageNodeImpl coverage = (CoverageNodeImpl) coveragemap.get(project);
    if (coverage == null) {
      coverage = new CoverageNodeImpl(ElementType.GROUP,
          project.getElementName());
      coveragemap.put(project, coverage);
      projects.add(project);
    }
    return coverage;
View Full Code Here

   *
   * @param name
   *            name for the coverage node created internally
   */
  protected AbstractGroupVisitor(final String name) {
    total = new CoverageNodeImpl(ElementType.GROUP, name);
  }
View Full Code Here

      }
    };
  }

  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

   *
   * @param name
   *            name for the coverage node created internally
   */
  protected AbstractGroupVisitor(final String name) {
    total = new CoverageNodeImpl(ElementType.GROUP, name);
  }
View Full Code Here

  public IReportVisitor visitChild(final ICoverageNode node)
      throws IOException {

    if (node.getElementType() != ElementType.GROUP) {
      final ICoverageNode emptyCoverage = new CoverageNodeImpl(
          ElementType.GROUP, "", false);
      final GroupColumn dummy = new GroupColumn(this, emptyCoverage);
      return new BundleColumn(this, dummy, node);
    }
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.