@Test
public void testPackageMerge() {
PackageAndProjectData pOne = new PackageAndProjectData(
buildOneCoverage(), "com.one");
ProjectData two = new ProjectData();
two.merge(pOne.getData());
addSomeStuff(two, "bleep", 1);
PackageAndProjectData pTwo = new PackageAndProjectData(two, "com.two");
ProjectDataDifferenceCalculator dcalc = new ProjectDataDifferenceCalculator(
two, pOne.getData());
assertEquals(7, two.getNumberOfCoveredLines());
assertEquals(1, dcalc.getDifference().getNumberOfCoveredLines());
ProjectData three = new ProjectData();
three.merge(two);
addSomeStuff(three, "foo", 4);
addSomeStuff(three, "blap", 5);
assertEquals(three.getNumberOfCoveredLines(), 13);
PackageAndProjectData pThree = new PackageAndProjectData(three,
"com.one");
List<PackageAndProjectData> x = new ArrayList<PackageAndProjectData>();
x.add(new PackageAndProjectData(buildBaseProjectData(), "ignored"));
x.add(pOne);