|
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.
*/
package complete.common;
import java.io.*;
import junit.framework.*;
import org.openide.util.Utilities;
import org.netbeans.junit.*;
import org.netbeans.jemmy.operators.*;
import org.netbeans.jellytools.*;
import org.netbeans.jellytools.nodes.Node;
import org.netbeans.jellytools.actions.*;
import org.netbeans.jellytools.modules.vcscore.VCSCommandsOutputOperator;
import org.netbeans.jellytools.modules.vcsgeneric.wizard.*;
import org.netbeans.jellytools.properties.*;
/** XTest / JUnit test class performing complete testing of Generic VCS mounting wizard.
* @author Jiri Kovalsky
* @version 1.0
*/
public class MountingWizard extends JellyTestCase {
public static String VERSIONING_MENU = "Versioning";
public static String MOUNT_MENU = VERSIONING_MENU + "|Mount Version Control|Generic VCS";
public static String UNMOUNT_MENU = "File|Unmount Filesystem";
public static String PVCS_SET_PASSWORD = "PVCS|Set Password";
public static String PVCS_LOCK = "PVCS|Lock";
public static String PVCS_REFRESH = "PVCS|Refresh";
public static String EMPTY_REFRESH = "Empty|Refresh";
/** Constructor required by JUnit.
* @param testName Method name to be used as testcase.
*/
public MountingWizard(String testName) {
super(testName);
}
/** Method used for explicit test suite definition.
* @return MountingWizard test suite.
*/
public static junit.framework.Test suite() {
TestSuite suite = new NbTestSuite();
suite.addTest(new MountingWizard("testProfileSelector"));
suite.addTest(new MountingWizard("testButtons"));
suite.addTest(new MountingWizard("testAdditionalProfilesLink"));
suite.addTest(new MountingWizard("testAutoLocking"));
suite.addTest(new MountingWizard("testAutoEditing"));
suite.addTest(new MountingWizard("testOSCompatibility"));
suite.addTest(new MountingWizard("testEnvironmentSetup"));
suite.addTest(new MountingWizard("testSettingsPropagated"));
suite.addTest(new MountingWizard("testSettingsActive"));
return suite;
}
/** Use for internal test execution inside IDE.
* @param args Command line arguments.
*/
public static void main(java.lang.String[] args) {
junit.textui.TestRunner.run(suite());
}
/** Method called before each testcase. Redirects system output.
*/
protected void setUp() throws Exception {
org.netbeans.jemmy.JemmyProperties.setCurrentOutput(org.netbeans.jemmy.TestOut.getNullOutput());
}
/** Tests profile selector. No item must be missing and behavior must be correct.
* @throws Exception any unexpected exception thrown during test.
*/
public void testProfileSelector() throws Exception {
try {
System.out.print(".. Testing profile selector ..");
new ActionNoBlock(MOUNT_MENU, null).perform();
VCSWizardProfile wizard = new VCSWizardProfile();
// wizard.checkOnlyCompatibleProfiles(false);
String profile = VCSWizardProfile.CVS_UNIX;
wizard.setProfile(profile);
wizard.verify(profile);
profile = VCSWizardProfile.CVS_WIN_95;
wizard.setProfileNoBlock(profile);
String question = "Do you really want to discard current commands and variables and replace them with the predefined";
new JLabelOperator(new JDialogOperator("Question"), "settings for " + profile + "?");
new QuestionDialogOperator(question).no();
wizard.verify(VCSWizardProfile.CVS_UNIX);
String[] profiles = new String[] {VCSWizardProfile.CVS_WIN_95, VCSWizardProfile.CVS_WIN_NT, VCSWizardProfile.EMPTY_UNIX,
VCSWizardProfile.EMPTY_WIN, VCSWizardProfile.PVCS_UNIX, VCSWizardProfile.PVCS_WIN_95, VCSWizardProfile.PVCS_WIN_NT,
VCSWizardProfile.VSS_WIN_95, VCSWizardProfile.VSS_WIN_NT};
for (int i=0; i |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 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.