~ubuntu-branches/ubuntu/precise/cobertura/precise

« back to all changes in this revision

Viewing changes to test/net/sourceforge/cobertura/coveragedata/ProjectDataTest.java

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Landaeta
  • Date: 2010-05-11 19:21:46 UTC
  • mfrom: (0.1.4 sid) (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100511192146-j742v5jsl89ztndu
Tags: 1.9.4.1+dfsg-2
* Now Build-Depends on libservlet2.5-java and add a missing Depends
  on the same package. (Closes: #580842). 
* Simplify list of JRE dependences for cobertura and drop JRE dependences for
  libcobertura-java as Java libraries are no longer required to depend on a
  JVM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * Cobertura - http://cobertura.sourceforge.net/
3
3
 *
4
4
 * Copyright (C) 2005 Mark Doliner
 
5
 * Copyright (C) 2010 Charlie Squires
5
6
 *
6
7
 * Cobertura is free software; you can redistribute it and/or modify
7
8
 * it under the terms of the GNU General Public License as published
21
22
 
22
23
package net.sourceforge.cobertura.coveragedata;
23
24
 
 
25
import java.util.Iterator;
 
26
import java.util.SortedSet;
 
27
 
24
28
import junit.framework.TestCase;
25
29
 
26
30
public class ProjectDataTest extends TestCase
147
151
                b.addClassData(classData3);
148
152
                assertEquals(a.hashCode(), b.hashCode());
149
153
        }
 
154
        
 
155
        public void testGetSubPackages()
 
156
        {
 
157
                coverageData.addClassData(new ClassData("com.example.HelloWorld"));
 
158
                coverageData.addClassData(new ClassData("com.example.test.HelloWorldTest"));
 
159
                coverageData.addClassData(new ClassData("com.examplesomething.HelloWorld"));
 
160
                
 
161
                SortedSet subPackagesSet = coverageData.getSubPackages("com.example");
 
162
                assertEquals(2, subPackagesSet.size());
 
163
                
 
164
                Iterator subPackages = subPackagesSet.iterator();
 
165
                assertEquals("com.example", ((PackageData)subPackages.next()).getName());
 
166
                assertEquals("com.example.test", ((PackageData)subPackages.next()).getName());
 
167
        }
150
168
 
151
169
}