1 19 package org.netbeans.modules.apisupport.project.universe; 20 21 import java.io.File ; 22 import java.io.IOException ; 23 import java.net.URL ; 24 import org.netbeans.modules.apisupport.project.TestBase; 25 26 29 public class TestEntryTest extends TestBase { 30 31 public TestEntryTest(String testName) { 32 super(testName); 33 } 34 35 public void testGetSourcesNbOrgModule() throws IOException { 36 File test = new File (nbCVSRootFile(),"nbbuild/build/testdist/unit/" + CLUSTER_IDE + "/org-netbeans-modules-apisupport-project/tests.jar"); TestEntry entry = TestEntry.get(test); 38 assertNotNull("TestEntry for aisupport/project tests",entry); 39 assertNotNull("Nbcvsroot wasn't found.", entry.getNBCVSRoot()); 40 URL srcDir = entry.getSrcDir(); 41 assertEquals(new File (nbCVSRootFile(),"apisupport/project/test/unit/src").toURI().toURL(),srcDir); 42 } 43 44 public void testGetSourcesFromExternalModule() throws IOException { 45 File test = resolveEEPFile("/suite4/build/testdist/unit/cluster/module1/tests.jar"); 46 TestEntry entry = TestEntry.get(test); 47 assertNotNull("TestEntry for aisupport/project tests",entry); 48 assertNull("Nbcvsroot was found.", entry.getNBCVSRoot()); 49 URL srcDir = entry.getSrcDir(); 50 assertEquals(resolveEEPFile("/suite4/module1/test/unit/src").toURI().toURL().toExternalForm(),srcDir.toExternalForm()); 51 } 52 53 } 54 | Popular Tags |