Package org.jacoco.core.internal.analysis

Examples of org.jacoco.core.internal.analysis.ClassCoverageImpl


    return result;
  }

  private void addClass(long id, String name, String source,
      MethodCoverageImpl... methods) {
    final ClassCoverageImpl coverage = new ClassCoverageImpl(name, id,
        null, "java/lang/Object", new String[0]);
    coverage.setSourceFileName(source);
    for (MethodCoverageImpl m : methods) {
      coverage.addMethod(m);
    }
    coverageBuilder.visitCoverage(coverage);
  }
View Full Code Here


    return result;
  }

  private void addClass(long id, String name, String source,
      MethodCoverageImpl... methods) {
    final ClassCoverageImpl coverage = new ClassCoverageImpl(name, id,
        null, "java/lang/Object", new String[0]);
    coverage.setSourceFileName(source);
    for (MethodCoverageImpl m : methods) {
      coverage.addMethod(m);
    }
    coverageBuilder.visitCoverage(coverage);
  }
View Full Code Here

        CounterImpl.getInstance(1, 2), 2);
    m.increment(CounterImpl.getInstance(4, 5), CounterImpl.COUNTER_0_0, 3);
    m.incrementMethodCounter();
    methodCoverage = m;

    final ClassCoverageImpl classCoverageImpl = new ClassCoverageImpl(
        "org/jacoco/example/FooClass", 1001, null, "java/lang/Object",
        new String[0]);
    classCoverageImpl.setSourceFileName("FooClass.java");
    classCoverageImpl.addMethod(methodCoverage);
    classCoverage = classCoverageImpl;

    final SourceFileCoverageImpl sourceFileCoverageImpl = new SourceFileCoverageImpl(
        "FooClass.java", "org/jacoco/example");
    sourceFileCoverageImpl.increment(classCoverage);
View Full Code Here

  private final CoverageNodeImpl groupCoverage;

  public ReportStructureTestDriver() {
    methodCoverage = new MethodCoverageImpl("fooMethod", "()V", null);

    final ClassCoverageImpl classCoverageImpl = new ClassCoverageImpl(
        "org/jacoco/example/FooClass", 1001, null, "java/lang/Object",
        new String[0]);
    classCoverageImpl.setSourceFileName("FooClass.java");
    classCoverageImpl.addMethod(methodCoverage);
    classCoverage = classCoverageImpl;

    sourceFileCoverage = new SourceFileCoverageImpl("FooClass.java",
        "org/jacoco/example");
    packageCoverage = new PackageCoverageImpl("org/jacoco/example",
View Full Code Here

    return result;
  }

  private void addClass(long id, String name, String source,
      MethodCoverageImpl... methods) {
    final ClassCoverageImpl coverage = new ClassCoverageImpl(name, id,
        null, "java/lang/Object", new String[0]);
    coverage.setSourceFileName(source);
    for (MethodCoverageImpl m : methods) {
      coverage.addMethod(m);
    }
    coverageBuilder.visitCoverage(coverage);
  }
View Full Code Here

        reader.readLine());
  }

  @Test
  public void TestRow() throws Exception {
    IClassCoverage node = new ClassCoverageImpl("test/package/Foo", 123,
        null, "java/lang/Object", null) {
      {
        instructionCounter = CounterImpl.getInstance(1, 11);
        branchCounter = CounterImpl.getInstance(2, 22);
        lineCounter = CounterImpl.getInstance(3, 33);
View Full Code Here

  @Before
  @Override
  public void setup() throws Exception {
    super.setup();
    node = new ClassCoverageImpl("org/jacoco/example/Foo", 123, null,
        "java/lang/Object", null);
    node.addMethod(new MethodCoverageImpl("a", "()V", null));
    node.addMethod(new MethodCoverageImpl("b", "()V", null));
    node.addMethod(new MethodCoverageImpl("c", "()V", null));
  }
View Full Code Here

    assertEquals("Foo.html", page.getFileName());
  }

  @Test
  public void testGetFileNameDefault() throws IOException {
    IClassCoverage defaultNode = new ClassCoverageImpl("Foo", 123, null,
        "java/lang/Object", null);
    page = new ClassPage(defaultNode, null, null, rootFolder, context);
    assertEquals("Foo.html", page.getFileName());
  }
View Full Code Here

    final MethodCoverageImpl m = new MethodCoverageImpl("fooMethod", "()V",
        null);
    m.increment(CounterImpl.getInstance(5, 5), CounterImpl.COUNTER_0_0, 1);
    m.incrementMethodCounter();

    final ClassCoverageImpl c = new ClassCoverageImpl(
        "org/jacoco/example/FooClass", 1001, false, null,
        "java/lang/Object", new String[0]);
    c.setSourceFileName("FooClass.java");
    c.addMethod(m);

    final SourceFileCoverageImpl s = new SourceFileCoverageImpl(
        "FooClass.java", "org/jacoco/example");
    s.increment(c);
View Full Code Here

        reader.readLine());
  }

  @Test
  public void TestRow() throws Exception {
    IClassCoverage node = new ClassCoverageImpl("test/package/Foo", 123,
        false, null, "java/lang/Object", null) {
      {
        instructionCounter = CounterImpl.getInstance(1, 11);
        branchCounter = CounterImpl.getInstance(2, 22);
        lineCounter = CounterImpl.getInstance(3, 33);
View Full Code Here

TOP

Related Classes of org.jacoco.core.internal.analysis.ClassCoverageImpl

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.