Package org.jacoco.core.analysis

Examples of org.jacoco.core.analysis.SourceFileCoverage


    output.assertAllClosed();
  }

  @Test(expected = IllegalStateException.class)
  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


    page.visitChild(new CoverageNodeImpl(ElementType.CLASS, "Foo", false));
  }

  @Test
  public void testContents() throws Exception {
    final SourceFileCoverage node = new SourceFileCoverage(
        "SourceFilePageTest.java", "org/jacoco/report/html");
    final SourceFilePage page = new SourceFilePage(node, null, root,
        context);
    page.visitEnd(locator);
View Full Code Here

        .findStr(result, "/html/body/pre/span[1]/@id"));
  }

  @Test
  public void testNoSource() throws IOException {
    final SourceFileCoverage node = new SourceFileCoverage(
        "DoesNotExist.java", "org/jacoco/report/html");
    final SourceFilePage page = new SourceFilePage(node, null, root,
        context);
    page.visitEnd(locator);
View Full Code Here

  }

  @Override
  public void visitEnd(final ISourceFileLocator sourceFileLocator)
      throws IOException {
    final SourceFileCoverage s = (SourceFileCoverage) getNode();
    sourceReader = sourceFileLocator.getSourceFile(s.getPackageName(), s
        .getName());
    if (sourceReader != null) {
      super.visitEnd(sourceFileLocator);
    }
  }
View Full Code Here

  }

  @Override
  protected void content(final HTMLElement body,
      final ISourceFileLocator sourceFileLocator) throws IOException {
    final SourceFileCoverage s = (SourceFileCoverage) getNode();
    new SourceHighlighter().render(body, s.getLines(), sourceReader);
    sourceReader.close();
  }
View Full Code Here

    output.assertAllClosed();
  }

  @Test(expected = IllegalStateException.class)
  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

    page.visitChild(new CoverageNodeImpl(ElementType.CLASS, "Foo", false));
  }

  @Test
  public void testContents() throws Exception {
    final SourceFileCoverage node = new SourceFileCoverage(
        "SourceFilePageTest.java", "org/jacoco/report/html");
    final SourceFilePage page = new SourceFilePage(node, null, root,
        context);
    page.visitEnd(locator);
View Full Code Here

        support.findStr(result, "/html/body/pre/span[1]/@id"));
  }

  @Test
  public void testNoSource() throws IOException {
    final SourceFileCoverage node = new SourceFileCoverage(
        "DoesNotExist.java", "org/jacoco/report/html");
    final SourceFilePage page = new SourceFilePage(node, null, root,
        context);
    page.visitEnd(locator);
View Full Code Here

TOP

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

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.