1 19 20 25 26 package org.netbeans.test.junit.pkgtestcreation; 27 28 import org.netbeans.jellytools.Bundle; 29 import org.netbeans.jellytools.EditorOperator; 30 import org.netbeans.jellytools.NbDialogOperator; 31 import org.netbeans.jellytools.NewFileWizardOperator; 32 import org.netbeans.jellytools.nodes.Node; 33 import org.netbeans.jemmy.operators.JButtonOperator; 34 import org.netbeans.jemmy.operators.JCheckBoxOperator; 35 import org.netbeans.jemmy.operators.JPopupMenuOperator; 36 import org.netbeans.jemmy.operators.JTextFieldOperator; 37 import org.netbeans.junit.NbTestSuite; 38 import org.netbeans.test.junit.testcase.JunitTestCase; 39 import org.netbeans.test.junit.utils.Utilities; 40 41 45 public class PkgCreateTestTest extends JunitTestCase { 46 47 48 private static final String TEST_PACKAGE_PATH = 49 "org.netbeans.test.junit.pkgtestcreation"; 50 51 52 private static final String TEST_PACKAGE_NAME = TEST_PACKAGE_PATH+".test"; 53 54 57 public PkgCreateTestTest(String testName) { 58 super(testName); 59 } 60 61 65 public static NbTestSuite suite() { 66 NbTestSuite suite = new NbTestSuite(PkgCreateTestTest.class); 67 return suite; 68 } 69 70 73 public void testCreateTestForPackage() { 74 Node n = Utilities.openFile(Utilities.SRC_PACKAGES_PATH + 76 "|" + TEST_PACKAGE_NAME); 77 Utilities.pushCreateTestsPopup(n); 78 NbDialogOperator ndo = new NbDialogOperator(CREATE_TESTS_DIALOG); 79 Utilities.checkAllCheckboxes(ndo); 80 ndo.btOK().push(); 81 Utilities.takeANap(Utilities.ACTION_TIMEOUT); 82 83 ref(filter.filter(new EditorOperator(Utilities.TEST_CLASS_NAME + "Test.java").getText())); 85 compareReferenceFiles(); 86 87 94 97 } 98 99 } 100 | Popular Tags |