Author: jjankovi
Date: 2011-12-19 11:39:29 -0500 (Mon, 19 Dec 2011)
New Revision: 37432
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/wizards/SimpleWSWizard.java
Log:
SimpleWSWizard added
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/wizards/SimpleWSWizard.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/wizards/SimpleWSWizard.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/wizards/SimpleWSWizard.java 2011-12-19
16:39:29 UTC (rev 37432)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.ui.bot.test.uiutils.wizards;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotRadioExt;
+
+/**
+ *
+ * @author jjankovi
+ *
+ */
+public class SimpleWSWizard extends Wizard {
+
+ private Type type;
+
+ public SimpleWSWizard(Type type) throws WidgetNotFoundException {
+ super(new SWTBot().activeShell().widget);
+ assert "Simple Web Service".equals(getText());
+ this.type = type;
+ if (type == Type.REST) {
+ new SWTBotRadioExt(bot().radio(0).widget).setSelection(false);
+ new SWTBotRadioExt(bot().radio(1).widget).clickWithoutDeselectionEvent();
+ }
+ }
+
+ public SimpleWSWizard setProjectName(String name) {
+ SWTBotCombo c = bot().comboBox(0);
+ c.setSelection(name);
+ return this;
+ }
+
+ public SimpleWSWizard setServiceName(String name) {
+ setText("Service name", name);
+ return this;
+ }
+
+ public SimpleWSWizard setPackageName(String name) {
+ setText("Package", name);
+ return this;
+ }
+
+ public SimpleWSWizard setClassName(String name) {
+ setText("Class", name);
+ return this;
+ }
+
+ public SimpleWSWizard setApplicationClassName(String name) {
+ assert type == Type.REST;
+ setText("Application class", name);
+ return this;
+ }
+
+ public SimpleWSWizard addRESTEasyLibraryFromRuntime() {
+ assert type == Type.REST;
+ //if server is AS, this checkbox is not enabled
+ if (bot().checkBox(1).isEnabled()) {
+ bot().checkBox(1).select();
+ }
+ return this;
+ }
+
+}