1 19 20 package org.netbeans.upgrade.systemoptions; 21 22 25 public class ProjectUIOptionsTest extends BasicTestForImport { 26 27 private static final String LAST_OPEN_PROJECT_DIR = "lastOpenProjectDir"; private static final String PROP_PROJECT_CATEGORY = "lastSelectedProjectCategory"; private static final String PROP_PROJECT_TYPE = "lastSelectedProjectType"; private static final String MAIN_PROJECT_URL = "mainProjectURL"; private static final String OPEN_AS_MAIN = "openAsMain"; private static final String OPEN_PROJECTS_URLS = "openProjectsURLs"; private static final String OPEN_SUBPROJECTS = "openSubprojects"; private static final String PROP_PROJECTS_FOLDER = "projectsFolder"; private static final String RECENT_PROJECTS_URLS = "recentProjectsURLs"; private static final String RECENT_TEMPLATES = "recentTemplates"; 39 40 41 42 public ProjectUIOptionsTest(String testName) { 43 super(testName, "org-netbeans-modules-project-ui-OpenProjectList.settings"); 44 } 45 public void testPreferencesNodePath() throws Exception { 46 assertPreferencesNodePath("/org/netbeans/modules/projectui"); 47 } 48 public void testPropertyNames() throws Exception { 49 assertPropertyNames(new String [] { 50 LAST_OPEN_PROJECT_DIR, 51 PROP_PROJECT_CATEGORY, 52 PROP_PROJECT_TYPE, 53 MAIN_PROJECT_URL, 54 OPEN_AS_MAIN, 55 OPEN_PROJECTS_URLS + ".0", 56 OPEN_SUBPROJECTS, 57 PROP_PROJECTS_FOLDER, 58 RECENT_PROJECTS_URLS + ".0", 59 RECENT_TEMPLATES + ".0", 60 RECENT_TEMPLATES + ".1", 61 }); 62 } 63 64 public void testLastOpenProjectDir() throws Exception { 65 assertProperty(LAST_OPEN_PROJECT_DIR, "/Users/mkleint"); 66 } 67 68 public void testLastSelectedProjectCategory() throws Exception { 69 assertProperty(PROP_PROJECT_CATEGORY, "Web"); 70 } 71 72 public void testLastSelectedProjectType() throws Exception { 73 assertProperty(PROP_PROJECT_TYPE, "emptyWeb"); 74 } 75 76 77 public void testOpenAsMain() throws Exception { 78 assertProperty(OPEN_AS_MAIN, "true"); 79 } 80 81 82 public void testOpenSubprojects() throws Exception { 83 assertProperty(OPEN_SUBPROJECTS, "true"); 84 } 85 86 public void testProjectsFolder() throws Exception { 87 assertProperty(PROP_PROJECTS_FOLDER, "/Users/mkleint"); 88 } 89 90 public void testMainProjectURL() throws Exception { 91 assertProperty(MAIN_PROJECT_URL, "file:/Users/mkleint/WebApplication1/"); 92 } 93 94 public void testOpenProjectsURLs() throws Exception { 95 assertProperty(OPEN_PROJECTS_URLS + ".0", "file:/Users/mkleint/WebApplication1/"); 96 } 97 98 public void testRecentProjectsURLs() throws Exception { 99 assertProperty(RECENT_PROJECTS_URLS + ".0", "file:/Users/mkleint/JavaApplication1/"); 100 } 101 102 public void testRecentTemplates() throws Exception { 103 assertProperty(RECENT_TEMPLATES + ".0", "Templates/JSP_Servlet/Servlet.java"); 104 assertProperty(RECENT_TEMPLATES + ".1", "Templates/JSP_Servlet/JSP.jsp"); 105 } 106 107 108 } 109 | Popular Tags |