Changeset 237 for trunk/org.modelica.mdt.test/src/org/modelica/mdt
- Timestamp:
- 12/16/05 14:43:23 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.test/src/org/modelica/mdt/test/TestNewClassWizard.java
r235 r237 2 2 * This file is part of Modelica Development Tooling. 3 3 * 4 * Copyright (c) 2005, Link �pings universitet, Department of4 * Copyright (c) 2005, Link�pings universitet, Department of 5 5 * Computer and Information Science, PELAB 6 6 * … … 23 23 * distribution. 24 24 * 25 * * Neither the name of Link �pings universitet nor the names of its25 * * Neither the name of Link�pings universitet nor the names of its 26 26 * contributors may be used to endorse or promote products derived from 27 27 * this software without specific prior written permission. … … 69 69 private static final String PROJECT_NAME_1 = 70 70 TestNewClassWizard.class.getName() + "1"; 71 72 /* a project name that is garanteed to be nonexistent */ 73 private static final String NON_EXSITING_PROJECT_NAME = 74 TestNewClassWizard.class.getName() + "non_existing_project"; 75 71 76 private StructuredSelection fileDestination; 72 77 … … 172 177 173 178 /** 179 * This test makes wizard to display a warning and error messages 180 * by entering invalid data into the fields. 181 * 182 * The test checks that the state of finish button is right, 183 * it should be enabled for warnings and disabled for errors. 184 * 185 * Test for BUG #1, se bugs database 186 */ 187 public void testFinishButtonState() 188 { 189 /* 190 * open dialog and set a legal source folder and an illegal class name, 191 * which should display a warning 192 */ 193 openWizardAndFetchWidgets(); 194 195 ttester.actionEnterText(sourceFolder, PROJECT_NAME_1); 196 ttester.actionEnterText(className, "#¤%&"); 197 assertTrue("Finish button should not be disabled for a warning", 198 finish.getEnabled()); 199 200 /* 201 * set legal class name and non-existing source folder, 202 * which should display an error 203 */ 204 ttester.actionEnterText(className, "legal_class_name"); 205 ttester.actionEnterText(sourceFolder, NON_EXSITING_PROJECT_NAME); 206 assertFalse("Finish button should not be enabled for an error", 207 finish.getEnabled()); 208 209 /* close the dialog */ 210 btester.actionClick(cancel); 211 } 212 213 /** 174 214 * check if the wizard 'remebers' it's class type selection 175 215 * between different invocations
Note: See TracChangeset
for help on using the changeset viewer.