Package org.jacoco.core.analysis

Examples of org.jacoco.core.analysis.CoverageNodeImpl


    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, false);
    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 total, final int covered) {
    return new CoverageNodeImpl(ElementType.GROUP, "Foo", false) {
      {
        this.lineCounter = CounterImpl.getInstance(total, covered);
      }
    };
  }
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

      public Locale getLocale() {
        return Locale.ENGLISH;
      }
    };
    node = new CoverageNodeImpl(ElementType.GROUP, "Test", false);
    page = new TestNodePage(node);
  }
View Full Code Here

    output.assertAllClosed();
  }

  @Test
  public void testGetNode() throws IOException {
    node.increment(new CoverageNodeImpl(ElementType.GROUP, "Foo", false) {
      {
        blockCounter = CounterImpl.getInstance(15, 8);
      }
    });
    page.visitEnd(null);
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

      return name + children;
    }
  }

  private CoverageNodeImpl createNode(String name) {
    return new CoverageNodeImpl(ElementType.GROUP, name, false);
  }
View Full Code Here

  public void setup() throws Exception {
    buffer = new StringWriter();
    support = new XMLSupport(XMLReportNodeHandler.class);
    root = new XMLDocument("report", "-//JACOCO//DTD Report 1.0//EN",
        "report.dtd", "UTF-8", true, buffer);
    handler = new XMLReportNodeHandler(root, new CoverageNodeImpl(
        ElementType.GROUP, "Sample", false));
  }
View Full Code Here

  }

  @Test
  public void testGroup() throws Exception {
    handler.visitChild(
        new CoverageNodeImpl(ElementType.GROUP, "Group1", false))
        .visitEnd(null);
    final Document doc = getDocument();
    assertEquals("Group1", support.findStr(doc, "//report/group/@name"));
  }
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.