- Timestamp:
- 02/05/06 15:03:38 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.test/src/org/modelica/mdt/test/TestNewClassWizard.java
r290 r291 49 49 import org.eclipse.swt.widgets.Combo; 50 50 import org.eclipse.swt.widgets.Text; 51 import org. eclipse.ui.PlatformUI;51 import org.modelica.mdt.core.IModelicaProject; 52 52 import org.modelica.mdt.core.ModelicaCore; 53 53 import org.modelica.mdt.test.util.Utility; … … 59 59 import abbot.tester.swt.TextTester; 60 60 61 import junit.framework.Assert; 61 62 import junit.framework.TestCase; 62 63 … … 101 102 */ 102 103 project = 103 ModelicaCore.createProject(PROJECT_NAME_1, 104 PlatformUI.getWorkbench().getActiveWorkbenchWindow()); 105 assertNotNull("failed to create project", project); 106 104 ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME_1); 105 106 /* create project only if it does not exist yet */ 107 if (!project.exists()) 108 { 109 IModelicaProject mproj = 110 ModelicaCore.getModelicaRoot().createProject(PROJECT_NAME_1); 111 Assert.assertNotNull("failed to create project", mproj); 112 113 project = mproj.getProject(); 114 } 115 107 116 /* 108 117 * create the selection that points at the root of the created project 109 118 */ 110 fileDestination = 111 new StructuredSelection(ResourcesPlugin.getWorkspace().getRoot(). 112 getProject(PROJECT_NAME_1)); 119 fileDestination = new StructuredSelection(project); 113 120 114 121 /* … … 120 127 121 128 } 122 123 124 129 125 130 public void openWizardAndFetchWidgets() … … 161 166 assertNotNull("Problems finding classType widget", classType); 162 167 163 164 168 /* make some checks on the state of the wizards */ 165 169 assertEquals("Wrong source folder selected", 166 sourceFolder.getText(), PROJECT_NAME_1);170 PROJECT_NAME_1, sourceFolder.getText()); 167 171 assertEquals("Junk present in class name field", 168 className.getText(), "");172 "", className.getText()); 169 173 assertFalse("initial equation unexpectedly selected", 170 174 initialEquation.getSelection()); … … 173 177 assertFalse("Finish button not disabled", 174 178 finish.getEnabled()); 175 176 177 179 } 178 180
Note: See TracChangeset
for help on using the changeset viewer.