Author: jjankovi
Date: 2012-04-18 07:09:37 -0400 (Wed, 18 Apr 2012)
New Revision: 40279
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/explorer/RESTfulExplorerTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/ti/wizard/RESTFullExplorerWizard.java
Log:
fixing ws tests
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-04-18
10:19:53 UTC (rev 40278)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-04-18
11:09:37 UTC (rev 40279)
@@ -14,6 +14,7 @@
import org.jboss.tools.ui.bot.ext.Timing;
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.config.Annotations.ServerState;
import org.jboss.tools.ws.ui.bot.test.WSTestBase;
/**
@@ -22,7 +23,7 @@
* @author jjankovi
*
*/
-@Require(server = @Server(), perspective = "Java EE")
+@Require(server = @Server(state=ServerState.NotRunning), perspective = "Java
EE")
public class RESTfulTestBase extends WSTestBase {
protected final RESTfulHelper restfulHelper = new RESTfulHelper();
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-04-18
10:19:53 UTC (rev 40278)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java 2012-04-18
11:09:37 UTC (rev 40279)
@@ -30,6 +30,7 @@
private RESTFullExplorerWizard restfulWizard = null;
+ private String restEmptyProjectName = "restEmpty";
private String restBasicProjectName = "restBasic";
private String restAdvancedProjectName = "restAdvanced";
@@ -46,9 +47,16 @@
@Test
public void testAddingSimpleRESTMethods() {
- setWsProjectName(restBasicProjectName);
+ setWsProjectName(restEmptyProjectName);
prepareRestProject();
+ packageExplorer.openFile(getWsProjectName(), "src",
+ getWsPackage(), getWsName() + ".java").toTextEditor();
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(BASIC_WS_RESOURCE),
+ false, getWsPackage(), getWsName());
+ bot.sleep(Timing.time2S());
+
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
@@ -67,9 +75,16 @@
@Test
public void testAddingAdvancedRESTMethods() {
- setWsProjectName(restAdvancedProjectName);
+ setWsProjectName(restBasicProjectName);
prepareRestProject();
+ packageExplorer.openFile(getWsProjectName(), "src",
+ getWsPackage(), getWsName() + ".java").toTextEditor();
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(ADVANCED_WS_RESOURCE),
+ false, getWsPackage(), getWsName());
+ bot.sleep(Timing.time2S());
+
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/ti/wizard/RESTFullExplorerWizard.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/ti/wizard/RESTFullExplorerWizard.java 2012-04-18
10:19:53 UTC (rev 40278)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/ti/wizard/RESTFullExplorerWizard.java 2012-04-18
11:09:37 UTC (rev 40279)
@@ -23,7 +23,7 @@
String[] pathToRestExplorer = {wsProjectName};
restFulExplorer = projectExplorer.selectTreeItem(
RESTFulAnnotations.REST_EXPLORER_LABEL.getLabel(),
- pathToRestExplorer).expand();
+ pathToRestExplorer).expand().expand();
}
/**
Show replies by date