|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun * Microsystems, Inc. All Rights Reserved. */ /* * File name EditorNewFileInPropertyEditorRemove1.java * * This is automated test writen in Jelly2 * Created on 19. September 2002, 11:40 */ package org.netbeans.properties.jelly2tests.suites.editing_properties_file; import java.io.File; import junit.textui.TestRunner; import org.netbeans.jellytools.JellyTestCase; import org.netbeans.jellytools.nodes.FilesystemNode; import org.netbeans.junit.NbTestSuite; import org.netbeans.properties.jelly2tests.operators.PropertiesEditorOperator; /** * * @author Petr Felenda - QA Engineer ( petr.felenda@sun.com ) */ public class EditNewFileInPropertyEditorRemove1 extends JellyTestCase { /* * Definition of member variables and objects */ private final String FILE_NAME = "testEditNewFileInPropertyEditorRemove1" ; private final String BUTTON_REMOVE_PROPERTY_NAME = "Remove Property"; /* * Main method for starting test from IDE. * There must be mounted necessary jars in Filesystems ( in Explorer Window ) * - jemmy.jar * - jelly2-nb.jar * both jars have been downloaded from http://jellytools.netbeans.org * @param String[] args - arguments are not processed */ public static void main(String[] args) { NbTestSuite nbTestSuite = new NbTestSuite(); nbTestSuite.addTest(new EditNewFileInPropertyEditorRemove1()); TestRunner.run(nbTestSuite); } /** * Constructor - Creates new instance of this class */ public EditNewFileInPropertyEditorRemove1() { super("testEditNewFileInPropertyEditorRemove1"); } /** * This method contains body of test * @return void */ public void testEditNewFileInPropertyEditorRemove1() { // Print test description to the Output window System.out.println(); System.out.println("==================================================================================="); System.out.println("= Test : Edit new file in property editor - Remove 1 ="); System.out.println("= See testspec of properties module on web : ="); System.out.println("= http://properties.netbeans.org/qa/testspecs/nb34/PropertiesTestSpec.html ="); System.out.println("==================================================================================="); /* * 1st step of testcase * Open property file */ //create a node for the sampledir directory FilesystemNode tmpNode = new FilesystemNode( System.getProperty( "xtest.workdir") + File.separator + "tmpdir"); PropertiesEditorOperator propertiesEditorOperator = new PropertiesEditorOperator(); propertiesEditorOperator.createNewPropertiesFile(tmpNode, this.FILE_NAME); /* * 2nd step of testcase * Try Push 'Remove Property' button */ propertiesEditorOperator.propertiesEditorClickRemovePropertyButton(this.FILE_NAME); /* * Result * There is no exceptions and nothing happened */ /* * Cleanup */ propertiesEditorOperator.deletePropertiesFileFromExplorer(tmpNode, this.FILE_NAME); } public static NbTestSuite suite() { NbTestSuite suite = new NbTestSuite(); suite.addTest(new EditNewFileInPropertyEditorRemove1()); return suite; } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.