Examples of ICoverageNode


Examples of org.jacoco.core.analysis.ICoverageNode

    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

Examples of org.jacoco.core.analysis.ICoverageNode

    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

Examples of org.jacoco.core.analysis.ICoverageNode

    assertEquals(0, c.compare(i1, i1));
    doc.close();
  }

  private ITableItem createItem(final int missed, final int covered) {
    final ICoverageNode node = createNode(missed, covered);
    return new ITableItem() {
      public String getLinkLabel() {
        return "Foo";
      }

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

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

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

Examples of org.jacoco.core.analysis.ICoverageNode

        node.getSignature());
  }

  @Test
  public void testEmptyMethod() {
    ICoverageNode node = new MethodCoverageImpl("sample", "()V", null);

    assertEquals(CounterImpl.getInstance(0, 0), node.getLineCounter());
    assertEquals(CounterImpl.getInstance(0, 0),
        node.getInstructionCounter());
    assertEquals(CounterImpl.getInstance(0, 0), node.getBranchCounter());
    assertEquals(CounterImpl.getInstance(1, 0), node.getMethodCounter());
    assertEquals(CounterImpl.getInstance(0, 0), node.getClassCounter());
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ICoverageNode

        lines.get(1));
  }

  @Test
  public void testStructureWithNestedGroups() throws IOException {
    final ICoverageNode root = new CoverageNodeImpl(ElementType.GROUP,
        "root", false);
    final List<SessionInfo> sessions = Collections.emptyList();
    final Collection<ExecutionData> data = Collections.emptyList();
    final IReportVisitor child = formatter.createReportVisitor(root,
        sessions, data);
View Full Code Here

Examples of org.jacoco.core.analysis.ICoverageNode

    assertEquals("org/jacoco/examples", data.getPackageName());
  }

  @Test
  public void testEmptyClass() {
    ICoverageNode data = new ClassCoverageImpl("Sample", 0, null,
        "java/lang/Object", new String[0]);
    assertEquals(CounterImpl.COUNTER_0_0, data.getInstructionCounter());
    assertEquals(CounterImpl.COUNTER_0_0, data.getBranchCounter());
    assertEquals(CounterImpl.COUNTER_0_0, data.getMethodCounter());
    assertEquals(CounterImpl.COUNTER_1_0, data.getClassCounter());
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ICoverageNode

  public void testSessionInfo() throws Exception {
    final List<SessionInfo> infos = new ArrayList<SessionInfo>();
    infos.add(new SessionInfo("session-1", 12345, 67890));
    infos.add(new SessionInfo("session-2", 1, 2));
    infos.add(new SessionInfo("session-3", 1, 2));
    ICoverageNode node = new CoverageNodeImpl(ElementType.GROUP, "Sample",
        false);
    final Collection<ExecutionData> data = Collections.emptyList();
    formatter.createReportVisitor(node, infos, data).visitEnd(null);
    assertPathMatches("session-1", "/report/sessioninfo[1]/@id");
    assertPathMatches("12345", "/report/sessioninfo[1]/@start");
View Full Code Here

Examples of org.jacoco.core.analysis.ICoverageNode

    assertEquals(0, c.compare(i1, i1));
    doc.close();
  }

  private ITableItem createItem(final int missed, final int covered) {
    final ICoverageNode node = createNode(missed, covered);
    return new ITableItem() {
      public String getLinkLabel() {
        return "Foo";
      }

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

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

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

Examples of org.jacoco.core.analysis.ICoverageNode

    assertTrue(c.compare(i2, i1) < 0);
    doc.close();
  }

  private ITableItem createItem(final int missed, final int covered) {
    final ICoverageNode node = createNode(missed, covered);
    return new ITableItem() {
      public String getLinkLabel() {
        return "Foo";
      }

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

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

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

Examples of org.jacoco.core.analysis.ICoverageNode

    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
TOP
Copyright © 2018 www.massapi.com. 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.