Package org.jacoco.core.internal.analysis

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


    }
  }

  private IBundleCoverage createBundle(String name) {
    final Collection<IPackageCoverage> packages = Collections.emptyList();
    return new BundleCoverageImpl(name, packages);
  }
View Full Code Here


    sourceFileCoverage = sourceFileCoverageImpl;

    packageCoverage = new PackageCoverageImpl("org/jacoco/example",
        Collections.singleton(classCoverage),
        Collections.singleton(sourceFileCoverage));
    bundleCoverage = new BundleCoverageImpl("bundle",
        Collections.singleton(packageCoverage));
  }
View Full Code Here

    final MethodCoverageImpl method3 = new MethodCoverageImpl("doit",
        "()V", null);
    method3.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 1);
    addClass(3, "Sample3", null, method3);

    BundleCoverageImpl bundle = coverageBuilder.getBundle("testbundle");
    assertEquals("testbundle", bundle.getName());

    final Collection<IPackageCoverage> packages = bundle.getPackages();
    assertEquals(2, packages.size());
    Map<String, IPackageCoverage> packagesByName = new HashMap<String, IPackageCoverage>();
    for (IPackageCoverage p : packages) {
      packagesByName.put(p.getName(), p);
    }
View Full Code Here

   * @param name
   *            Name of the bundle
   * @return bundle containing all classes and source files
   */
  public BundleCoverageImpl getBundle(final String name) {
    return new BundleCoverageImpl(name, classes.values(),
        sourcefiles.values());
  }
View Full Code Here

    }
  }

  private IBundleCoverage createBundle(String name) {
    final Collection<IPackageCoverage> packages = Collections.emptyList();
    return new BundleCoverageImpl(name, packages);
  }
View Full Code Here

    sourceFileCoverage = sourceFileCoverageImpl;

    packageCoverage = new PackageCoverageImpl("org/jacoco/example",
        Collections.singleton(classCoverage),
        Collections.singleton(sourceFileCoverage));
    bundleCoverage = new BundleCoverageImpl("bundle",
        Collections.singleton(packageCoverage));
  }
View Full Code Here

    sourceFileCoverage = sourceFileCoverageImpl;

    packageCoverage = new PackageCoverageImpl("org/jacoco/example",
        Collections.singleton(classCoverage),
        Collections.singleton(sourceFileCoverage));
    bundleCoverage = new BundleCoverageImpl("bundle",
        Collections.singleton(packageCoverage));
  }
View Full Code Here

      PackageFragementRootAnalyzer analyzer, IProgressMonitor monitor)
      throws CoreException {
    final TypeVisitor visitor = new TypeVisitor(analyzer.analyze(root));
    new TypeTraverser(root).process(visitor, monitor);

    final IBundleCoverage bundle = new BundleCoverageImpl(getName(root),
        visitor.getClasses(), visitor.getSources());
    modelcoverage.putFragmentRoot(root, bundle);
    putPackages(bundle.getPackages(), root);
  }
View Full Code Here

    if (name.length() == 0) {
      // for project roots take project name:
      name = root.getParent().getElementName();
    }

    IBundleCoverage bundle = new BundleCoverageImpl(name, visitor.getClasses(),
        visitor.getSources());
    modelcoverage.putFragmentRoot(root, bundle);
    putPackages(bundle.getPackages(), root);
  }
View Full Code Here

    if (name.length() == 0) {
      // for project roots take project name:
      name = root.getParent().getElementName();
    }

    IBundleCoverage bundle = new BundleCoverageImpl(name, visitor.getClasses(),
        visitor.getSources());
    modelcoverage.putFragmentRoot(root, bundle);
    putPackages(bundle.getPackages(), root);
  }
View Full Code Here

TOP

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

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.