Author: jjankovi
Date: 2012-04-30 07:46:55 -0400 (Mon, 30 Apr 2012)
New Revision: 40631
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java
Log:
modified RESTfulExplorerTest to test RESTful explorer without saving java file
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-30
11:45:53 UTC (rev 40630)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java 2012-04-30
11:46:55 UTC (rev 40631)
@@ -35,6 +35,11 @@
return restEmptyProjectName;
}
+ @Override
+ public void cleanup() {
+ bot.activeEditor().toTextEditor().save();
+ }
+
@Test
public void testAddingSimpleRESTMethods() {
@@ -42,7 +47,7 @@
getWsPackage(), getWsName() + ".java").toTextEditor();
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.getResourceAsStream(BASIC_WS_RESOURCE),
- false, getWsPackage(), getWsName());
+ false, false, getWsPackage(), getWsName());
bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
@@ -67,7 +72,7 @@
getWsPackage(), getWsName() + ".java").toTextEditor();
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.getResourceAsStream(ADVANCED_WS_RESOURCE),
- false, getWsPackage(), getWsName());
+ false, false, getWsPackage(), getWsName());
bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
@@ -110,7 +115,7 @@
getWsPackage(), getWsName() + ".java").toTextEditor();
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.getResourceAsStream(BASIC_WS_RESOURCE),
- false, getWsPackage(), getWsName());
+ false, false, getWsPackage(), getWsName());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
@@ -120,7 +125,7 @@
packageExplorer.openFile(getWsProjectName(), "src",
getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(), "@DELETE",
"@GET");
+ resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(), "@DELETE",
"@GET", false);
bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
@@ -143,7 +148,7 @@
getWsPackage(), getWsName() + ".java").toTextEditor();
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.getResourceAsStream(ADVANCED_WS_RESOURCE),
- false, getWsPackage(), getWsName());
+ false, false, getWsPackage(), getWsName());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
@@ -159,9 +164,10 @@
packageExplorer.openFile(getWsProjectName(), "src",
getWsPackage(), getWsName() + ".java").toTextEditor();
- resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
"/delete/{id}", "delete/edited/{id}");
+ resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(),
+ "/delete/{id}", "delete/edited/{id}", false);
resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(), "@DELETE",
- "@DELETE" + LINE_SEPARATOR +
"@Produces(\"text/plain\")");
+ "@DELETE" + LINE_SEPARATOR +
"@Produces(\"text/plain\")", false);
bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
@@ -182,7 +188,7 @@
getWsPackage(), getWsName() + ".java").toTextEditor();
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.getResourceAsStream(BASIC_WS_RESOURCE),
- false, getWsPackage(), getWsName());
+ false, false, getWsPackage(), getWsName());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
@@ -195,7 +201,7 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
getResourceAsStream(EMPTY_WS_RESOURCE),
- false, getWsPackage(), getWsName());
+ false, false, getWsPackage(), getWsName());
bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());