[jbosstools-commits] JBoss Tools SVN: r42104 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test: rest and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Wed Jun 20 09:44:46 EDT 2012
Author: jjankovi
Date: 2012-06-20 09:44:46 -0400 (Wed, 20 Jun 2012)
New Revision: 42104
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java
Log:
change methods for importing project to static to be used in BeforeClass methods in ws bot tests
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-06-20 13:43:51 UTC (rev 42103)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-06-20 13:44:46 UTC (rev 42104)
@@ -19,6 +19,7 @@
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.helper.ImportHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.WsWizardBase.Slider_Level;
import org.jboss.tools.ws.ui.bot.test.utils.DeploymentHelper;
import org.jboss.tools.ws.ui.bot.test.utils.ProjectHelper;
@@ -115,17 +116,22 @@
protected String getWsName() {
return null;
}
+
+ protected void assertWebServiceTesterIsActive() {
+ assertTrue("Web Service Tester view should be active",
+ bot.viewByTitle(IDELabel.View.WEB_SERVICE_TESTER).isActive());
+ }
public static String getSoapRequest(String body) {
return MessageFormat.format(SOAP_REQUEST_TEMPLATE, body);
}
- protected void importWSTestProject(String projectName) {
+ protected static void importWSTestProject(String projectName) {
String location = "/resources/projects/" + projectName;
importWSTestProject(location, projectName);
}
- protected void importWSTestProject(String projectLocation, String dir) {
+ protected static void importWSTestProject(String projectLocation, String dir) {
ImportHelper.importProject(projectLocation, dir, Activator.PLUGIN_ID);
eclipse.addConfiguredRuntimeIntoProject(dir, configuredState.getServer().name);
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-06-20 13:43:51 UTC (rev 42103)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-06-20 13:44:46 UTC (rev 42104)
@@ -18,7 +18,8 @@
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
import org.jboss.tools.ws.ui.bot.test.WSTestBase;
-import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
+import org.jboss.tools.ws.ui.bot.test.uiutils.RESTFullExplorer;
+import org.jboss.tools.ws.ui.bot.test.uiutils.RunOnServerDialog;
/**
* Test base for bot tests using RESTFul support
@@ -29,9 +30,9 @@
@Require(server = @Server(state = ServerState.NotRunning), perspective = "Java EE")
public class RESTfulTestBase extends WSTestBase {
- protected final RESTfulHelper restfulHelper = new RESTfulHelper();
+ protected final static RESTfulHelper restfulHelper = new RESTfulHelper();
- protected RESTFullExplorerWizard restfulWizard = null;
+ protected RESTFullExplorer restfulWizard = null;
protected final String SIMPLE_REST_WS_RESOURCE = "SimpleRestWS.java.ws";
@@ -53,7 +54,7 @@
}
- protected void importRestWSProject(String projectName) {
+ protected static void importRestWSProject(String projectName) {
// importing project without targeted runtime set
importWSTestProject(projectName);
@@ -155,8 +156,13 @@
foundCount == expectedCount);
}
+ protected void runRestServiceOnConfiguredServer(String webService) {
+ RunOnServerDialog dialog = restfulWizard.runOnServer(restfulWizard.restService(webService));
+ dialog.chooseExistingServer().selectServer(configuredState.getServer().name).finish();
+ }
+
protected SWTBotTreeItem[] restfulServicesForProject(String projectName) {
- restfulWizard = new RESTFullExplorerWizard(projectName);
+ restfulWizard = new RESTFullExplorer(projectName);
return restfulWizard.getAllRestServices();
}
More information about the jbosstools-commits
mailing list