| 1 19 20 28 29 package org.netbeans.properties.jelly2tests.suites.creating_properties_file; 30 31 import org.netbeans.jellytools.*; 32 import lib.PropertiesEditorTestCase; 33 import org.netbeans.jellytools.nodes.Node; 34 35 import org.netbeans.jellytools.nodes.SourcePackagesNode; 36 37 38 42 public class CreatingPropertiesFileFromExplorer1 extends PropertiesEditorTestCase { 43 44 47 final String FILE_NAME = "testFileExplorer1" ; 48 final String PACKAGE_PATH = "samples"; 49 50 51 52 55 public CreatingPropertiesFileFromExplorer1() { 56 super("testCreatingPropertiesFileFromExplorer1"); 57 } 58 59 63 public void testCreatingPropertiesFileFromExplorer1() { 64 65 66 openDefaultProject(); 68 69 74 log(PACKAGE_PATH); 75 SourcePackagesNode spn = new SourcePackagesNode(defaultProjectName); 76 Node node = new Node(spn,PACKAGE_PATH); 77 78 node.select(); 79 node.callPopup().pushMenuNoBlock("New"+menuSeparator+"File/Folder...",menuSeparator); 80 NewFileWizardOperator newWizard = new NewFileWizardOperator(); 81 newWizard.selectCategory(WIZARD_CATEGORY_FILE); 82 newWizard.selectFileType(WIZARD_FILE_TYPE); 83 newWizard.next(); 84 85 89 NewFileNameLocationStepOperator nameStepOper = new NewFileNameLocationStepOperator(); 90 nameStepOper.setObjectName(FILE_NAME); 91 92 93 97 newWizard.finish(); 98 99 103 if ( ! existsFileInEditor(FILE_NAME) ) 104 fail("File "+ FILE_NAME +" not found in Editor window"); 105 if ( ! existsFileInExplorer("samples",FILE_NAME) ) 106 fail("File "+ FILE_NAME +" not found in explorer"); 107 } 108 109 public void tearDown() { 110 log("Teardown"); 111 closeFiles(); 112 } 113 114 115 116 117 } 118 | Popular Tags |