1 19 20 package org.netbeans.modules.apisupport.project; 21 22 import org.netbeans.api.java.classpath.ClassPath; 23 import org.netbeans.api.project.Project; 24 import org.netbeans.api.project.ProjectManager; 25 import org.netbeans.api.project.ProjectUtils; 26 import org.netbeans.modules.apisupport.project.universe.ModuleList; 27 import org.openide.filesystems.FileObject; 28 29 34 public class AvoidModuleListInProjectConstructorTest extends TestBase { 35 36 public AvoidModuleListInProjectConstructorTest(String name) { 37 super(name); 38 } 39 40 public void testNetBeansOrgModules() throws Exception { 41 assertEquals("no scans of netbeans.org initially", 0, ModuleList.getKnownEntries(file("nbbuild/netbeans/ide6/org-apache-tools-ant-module.jar")).size()); 42 FileObject fo = nbCVSRoot().getFileObject("ant"); 43 Project p = ProjectManager.getDefault().findProject(fo); 44 assertNotNull(p); 45 assertEquals("still no scans", 0, ModuleList.getKnownEntries(file("nbbuild/netbeans/" + TestBase.CLUSTER_IDE + "/modules/org-apache-tools-ant-module.jar")).size()); 46 assertEquals("org.apache.tools.ant.module", ProjectUtils.getInformation(p).getName()); 47 assertEquals("still no scans", 0, ModuleList.getKnownEntries(file("nbbuild/netbeans/" + TestBase.CLUSTER_IDE + "/modules/org-apache-tools-ant-module.jar")).size()); 48 ClassPath.getClassPath(fo.getFileObject("src"), ClassPath.COMPILE); 49 assertEquals("now have scanned something", 1, ModuleList.getKnownEntries(file("nbbuild/netbeans/" + TestBase.CLUSTER_IDE + "/modules/org-apache-tools-ant-module.jar")).size()); 50 } 51 52 } 53 | Popular Tags |