Package org.jacoco.core.analysis

Examples of org.jacoco.core.analysis.IClassCoverage


    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


        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

        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

    Collection<ISourceFileCoverage> getSources() {
      return sources;
    }

    public void visit(IType type, String vmname) {
      final IClassCoverage coverage = nodes.getClassCoverage(vmname);
      if (coverage != null) {
        classes.add(coverage);
        modelcoverage.putType(type, coverage);
      }
    }
View Full Code Here

    }

    public void visit(IClassFile classfile) throws JavaModelException {
      final String vmname = classfile.getType().getFullyQualifiedName()
          .replace('.', '/');
      final IClassCoverage coverage = nodes.getClassCoverage(vmname);
      if (coverage != null) {
        modelcoverage.putClassFile(classfile, coverage);
        // Add source file coverage manually in case of binary roots
        // as we will not see compilation units:
        final ISourceFileCoverage source = nodes.getSourceFileCoverage(
            coverage.getPackageName(), coverage.getSourceFileName());
        if (source != null) {
          sources.add(source);
        }
      }
    }
View Full Code Here

    Collection<ISourceFileCoverage> getSources() {
      return sources;
    }

    public void visit(IType type, String vmname) {
      final IClassCoverage coverage = nodes.getClassCoverage(vmname);
      if (coverage != null) {
        classes.add(coverage);
        modelcoverage.putType(type, coverage);
      }
    }
View Full Code Here

    }

    public void visit(IClassFile classfile) throws JavaModelException {
      final String vmname = classfile.getType().getFullyQualifiedName()
          .replace('.', '/');
      final IClassCoverage coverage = nodes.getClassCoverage(vmname);
      if (coverage != null) {
        modelcoverage.putClassFile(classfile, coverage);
        // Add source file coverage manually in case of binary roots
        // as we will not see compilation units:
        final ISourceFileCoverage source = nodes.getSourceFileCoverage(
            coverage.getPackageName(), coverage.getSourceFileName());
        if (source != null) {
          sources.add(source);
        }
      }
    }
View Full Code Here

    }
    return null;
  }

  private void resolveMethods(final IType type) {
    IClassCoverage classCoverage = (IClassCoverage) getCoverageFor(type);
    if (classCoverage == null) {
      return;
    }
    try {
      MethodLocator locator = new MethodLocator(type);
      for (IMethodCoverage methodCoverage : classCoverage.getMethods()) {
        final IMethod method = locator.findMethod(methodCoverage.getName(),
            methodCoverage.getDesc());
        if (method != null) {
          coveragemap.put(method, methodCoverage);
        } else {
View Full Code Here

    Collection<ISourceFileCoverage> getSources() {
      return sources;
    }

    public void visit(IType type, String vmname) {
      final IClassCoverage coverage = nodes.getClassCoverage(vmname);
      if (coverage != null) {
        classes.add(coverage);
        modelcoverage.putType(type, coverage);
      }
    }
View Full Code Here

    }

    public void visit(IClassFile classfile) throws JavaModelException {
      final String vmname = classfile.getType().getFullyQualifiedName()
          .replace('.', '/');
      final IClassCoverage coverage = nodes.getClassCoverage(vmname);
      if (coverage != null) {
        modelcoverage.putClassFile(classfile, coverage);
        // Add source file coverage manually in case of binary roots
        // as we will not see compilation units:
        final ISourceFileCoverage source = nodes.getSourceFileCoverage(
            coverage.getPackageName(), coverage.getSourceFileName());
        if (source != null) {
          sources.add(source);
        }
      }
    }
View Full Code Here

TOP

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

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.