public class PackageDependenciesTest extends TestCase {
/**
* Tests that the package dependencies constraint is met for the analyzed packages.
*/
public void testPackageDependencies() throws IOException {
PackageFilter packageFilter = new PackageFilter();
// Ignore Java packages and Swing sub packages
packageFilter.addPackage("java.*");
packageFilter.addPackage("javax.swing.*");
// Ignore JUnit tests
packageFilter.addPackage("com.eteks.sweethome3d.junit");
JDepend jdepend = new JDepend(packageFilter);
jdepend.addDirectory("classes");
DependencyConstraint constraint = new DependencyConstraint();