Author: jjankovi
Date: 2012-02-01 03:40:16 -0500 (Wed, 01 Feb 2012)
New Revision: 38361
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/completion/RESTfulCompletionTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java
Log:
Moved all resources for REST tests to RESTfulTestBase
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-02-01
08:38:15 UTC (rev 38360)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-02-01
08:40:16 UTC (rev 38361)
@@ -48,6 +48,14 @@
protected final String REST_EXPLORER_LABEL = "JAX-RS REST Web Services";
protected final String REST_EXPLORER_LABEL_BUILD = "Building RESTful Web
Services...";
protected final String VALIDATION_SETTINGS_CHANGED = "Validation Settings
Changed";
+
+ protected final String BASIC_WS_RESOURCE =
"/resources/restful/BasicRestfulWS.java.ws";
+
+ protected final String ADVANCED_WS_RESOURCE =
"/resources/restful/AdvancedRestfulWS.java.ws";
+
+ protected final String EMPTY_WS_RESOURCE =
"/resources/restful/EmptyRestfulWS.java.ws";
+
+ protected final String SIMPLE_REST_WS_RESOURCE =
"/resources/restful/SimpleRestWS.java.ws";
private enum ConfigureOption {
ADD, REMOVE;
@@ -90,7 +98,7 @@
*/
protected void modifyRESTValidation(ConfigureOption option) {
- SWTBot validationBot = openValidationPreference(VALIDATION_PREFERENCE,
+ SWTBot validationBot = openPreferencePage(VALIDATION_PREFERENCE,
new ArrayList<String>());
validationBot.button(ENABLE_ALL).click();
@@ -147,13 +155,15 @@
BuildPathHelper buildPathHelper = new BuildPathHelper();
for (File f : restLibsPaths) {
- buildPathHelper.addExternalJar(f.getPath(), getWsProjectName());
+ buildPathHelper.addExternalJar(f.getPath(), getWsProjectName(), true);
}
}
private List<File> getPathForRestLibs() {
+ assertTrue(TestConfigurator.currentConfig.getServer().type.equals("EAP"));
+
String runtimeHome = TestConfigurator.currentConfig.getServer().runtimeHome;
// index of last occurence of "/" in EAP runtime path:
jboss-eap-5.1/jboss-as
@@ -186,7 +196,7 @@
util.waitForNonIgnoredJobs();
}
- private SWTBot openValidationPreference(final String name,
+ private SWTBot openPreferencePage(final String name,
final List<String> groupPath) {
return open.preferenceOpen(new IPreference() {
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java 2012-02-01
08:38:15 UTC (rev 38360)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java 2012-02-01
08:40:16 UTC (rev 38361)
@@ -26,8 +26,6 @@
*/
public class RESTfulCompletionTest extends RESTfulTestBase{
- private final String SIMPLE_REST_WS_RESOURCE =
"/resources/restful/SimpleRestWS.java.ws";
-
private final String GET_METHOD_PATH = "/{userId}";
private final String EMPTY_PATH_PARAM = "";
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java 2012-02-01
08:38:15 UTC (rev 38360)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java 2012-02-01
08:40:16 UTC (rev 38361)
@@ -28,12 +28,6 @@
private RESTFullExplorerWizard restfulWizard = null;
- private final String BASIC_WS_RESOURCE_PATH =
"/resources/restful/BasicRestfulWS.java.ws";
-
- private final String ADVANCED_WS_RESOURCE_PATH =
"/resources/restful/AdvancedRestfulWS.java.ws";
-
- private final String EMPTY_WS_RESOURCE_PATH =
"/resources/restful/EmptyRestfulWS.java.ws";
-
protected String getWsProjectName() {
return "RestServicesExplorer";
}
@@ -51,7 +45,7 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream(BASIC_WS_RESOURCE_PATH),
+ getResourceAsStream(BASIC_WS_RESOURCE),
false, getWsPackage(), getWsName());
bot.sleep(Timing.time2S());
@@ -75,7 +69,7 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream(ADVANCED_WS_RESOURCE_PATH),
+ getResourceAsStream(ADVANCED_WS_RESOURCE),
false, getWsPackage(), getWsName());
bot.sleep(Timing.time2S());
@@ -117,7 +111,7 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream(BASIC_WS_RESOURCE_PATH),
+ getResourceAsStream(BASIC_WS_RESOURCE),
false, getWsPackage(), getWsName());
bot.sleep(Timing.time2S());
@@ -149,7 +143,7 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream(ADVANCED_WS_RESOURCE_PATH),
+ getResourceAsStream(ADVANCED_WS_RESOURCE),
false, getWsPackage(), getWsName());
bot.sleep(Timing.time2S());
@@ -186,7 +180,7 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream(BASIC_WS_RESOURCE_PATH),
+ getResourceAsStream(BASIC_WS_RESOURCE),
false, getWsPackage(), getWsName());
bot.sleep(Timing.time2S());
@@ -198,7 +192,7 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream(EMPTY_WS_RESOURCE_PATH),
+ getResourceAsStream(EMPTY_WS_RESOURCE),
false, getWsPackage(), getWsName());
bot.sleep(Timing.time2S());
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java 2012-02-01
08:38:15 UTC (rev 38360)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java 2012-02-01
08:40:16 UTC (rev 38361)
@@ -25,7 +25,6 @@
private final String GET_METHOD_PATH = "/{id}";
private final String CORRECT_PATH_PARAM = "id";
private final String BAD_PATH_PARAM = "customerId";
- private final String SIMPLE_REST_WS_RESOURCE =
"/resources/restful/SimpleRestWS.java.ws";
protected String getWsProjectName() {
return "RestServicesValidation";