@Test
public void testCounters() {
Collection<IClassCoverage> classes = Collections.emptySet();
Collection<ISourceFileCoverage> sourcefiles = Collections.emptySet();
final IPackageCoverage p1 = new PackageCoverageImpl("p1", classes,
sourcefiles) {
{
classCounter = CounterImpl.getInstance(1, 0);
methodCounter = CounterImpl.getInstance(2, 0);
branchCounter = CounterImpl.getInstance(3, 0);
instructionCounter = CounterImpl.getInstance(4, 0);
lineCounter = CounterImpl.getInstance(5, 0);
}
};
final IPackageCoverage p2 = new PackageCoverageImpl("p1", classes,
sourcefiles) {
{
classCounter = CounterImpl.getInstance(1, 0);
methodCounter = CounterImpl.getInstance(2, 0);
branchCounter = CounterImpl.getInstance(3, 0);