1 19 20 package org.netbeans.modules.apisupport.project.ui.wizard; 21 22 import java.io.File ; 23 import java.util.HashMap ; 24 import java.util.Map ; 25 import java.util.jar.Manifest ; 26 import org.netbeans.junit.NbTestCase; 27 import org.netbeans.modules.apisupport.project.TestBase; 28 29 33 public class LibraryStartVisualPanelTest extends NbTestCase { 34 35 public LibraryStartVisualPanelTest(String testName) { 36 super(testName); 37 } 38 39 public void testPopulateProjectData() throws Exception { 40 Map contents = new HashMap (); 41 contents.put("org/apache/commons/logging/Log.class", ""); 42 contents.put("1.0-beta/X.class", ""); contents.put("org/apache/commons/logging/impl/NoOpLog.class", ""); 44 File libraryPath = new File (getWorkDir(), "test-library-0.1_01.jar"); 45 TestBase.createJar(libraryPath, contents, new Manifest ()); 46 NewModuleProjectData data = new NewModuleProjectData(NewNbModuleWizardIterator.TYPE_LIBRARY_MODULE); 47 LibraryStartVisualPanel.populateProjectData(data, libraryPath.getAbsolutePath(), true); 48 assertEquals("test-library", data.getProjectName()); 49 assertEquals("org.apache.commons.logging", data.getCodeNameBase()); 50 } 51 52 } 53 | Popular Tags |