Author: jjankovi
Date: 2011-08-23 07:18:02 -0400 (Tue, 23 Aug 2011)
New Revision: 34164
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/CDIQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/CDIUtil.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/WSAllBotTests.launch
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/WsTesterTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/BottomUpWSTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/TopDownWSTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/WsClientTest.java
Log:
Bot tests operating on Quick Fixed of CDI components have been added
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/CDIQuickFixTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/CDIQuickFixTest.java 2011-08-23
08:56:42 UTC (rev 34163)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/CDIQuickFixTest.java 2011-08-23
11:18:02 UTC (rev 34164)
@@ -8,6 +8,7 @@
import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
import org.jboss.tools.cdi.bot.test.uiutils.actions.CDIUtil;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
@@ -17,6 +18,7 @@
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.junit.After;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -32,16 +34,22 @@
@SuiteClasses({ CDIAllBotTests.class })
public class CDIQuickFixTest extends SWTTestExt {
- private static final Logger LOGGER = Logger.getLogger(CDIQuickFixTest.class.getName());
+ private static final Logger LOGGER = Logger.getLogger(CDIQuickFixTest.class
+ .getName());
private static final String PROJECT_NAME = "CDIProject";
private static final String PACKAGE_NAME = "org.cdi.test";
+ private static SWTBotTreeItem[] problemsTrees;
+ private static final String LINE_SEPARATOR =
System.getProperty("line.separator");
+ private enum ANNOTATIONS {TARGET, RETENTION, NAMED, TYPED}
@BeforeClass
public static void setup() {
eclipse.showView(ViewType.PROJECT_EXPLORER);
- CDIUtil.createAndCheckCDIProject(bot, util, projectExplorer, PROJECT_NAME);
+ CDIUtil.disableFolding(bot, util);
+ CDIUtil.createAndCheckCDIProject(bot, util, projectExplorer,
+ PROJECT_NAME);
}
-
+
@After
public void waitForJobs() {
util.waitForNonIgnoredJobs();
@@ -62,21 +70,20 @@
CDIUtil.copyResourceToClass(ed, CDIQuickFixTest.class
.getResourceAsStream("/resources/cdi/B1.java.cdi"), false);
assertContains("@SessionScoped", ed.toTextEditor().getText());
- SWTBotTreeItem[] warningTrees = ProblemsView.
- getFilteredWarningsTreeItems(bot, "Managed bean B1 which", "/"
- + PROJECT_NAME, "B1.java", "CDI Problem");
- assertTrue(warningTrees.length == 1);
-
- CDIUtil.resolveQuickFix(warningTrees[0], bot, util);
+ problemsTrees = ProblemsView.getFilteredWarningsTreeItems(bot,
+ "Managed bean B1 which", "/" + PROJECT_NAME,
"B1.java",
+ "CDI Problem");
+ assertTrue(problemsTrees.length == 1);
+
+ CDIUtil.resolveQuickFix(problemsTrees[0], bot, util);
SWTBotEclipseEditor eclEditor = ed.toTextEditor();
assertTrue(eclEditor.getText().contains("import java.io.Serializable;"));
- warningTrees = ProblemsView.getFilteredWarningsTreeItems(bot,
+ problemsTrees = ProblemsView.getFilteredWarningsTreeItems(bot,
"Managed bean B1 which", "/" + PROJECT_NAME,
"B1.java",
"CDI Problem");
- assertTrue(warningTrees.length == 0);
+ assertTrue(problemsTrees.length == 0);
}
-
@Test
public void testMultipleBeansQF() {
CDIUtil.bean(PACKAGE_NAME, "Animal", true, false, false, false, null,
@@ -106,54 +113,268 @@
assertTrue(("Q1.java").equals(ed.getTitle()));
code = ed.toTextEditor().getText();
LOGGER.fine(code);
-
- CDIUtil.bean(PACKAGE_NAME, "BrokenFarm", true, false, false, false, null,
- null, null, null).finish();
+
+ CDIUtil.bean(PACKAGE_NAME, "BrokenFarm", true, false, false, false,
+ null, null, null, null).finish();
util.waitForNonIgnoredJobs();
ed = bot.activeEditor();
CDIUtil.copyResourceToClass(ed, CDIQuickFixTest.class
- .getResourceAsStream("/resources/cdi/BrokenFarm.java.cdi"), false);
+ .getResourceAsStream("/resources/cdi/BrokenFarm.java.cdi"),
+ false);
assertTrue(("BrokenFarm.java").equals(ed.getTitle()));
code = ed.toTextEditor().getText();
LOGGER.fine(code);
assertTrue(code.contains("package " + PACKAGE_NAME + ";"));
assertTrue(code.contains("public class BrokenFarm {"));
assertTrue(code.contains("@Inject private Animal animal;"));
-
- SWTBotTreeItem[] warningTrees = ProblemsView
- .getFilteredWarningsTreeItems(bot, "Multiple beans are eligible",
"/"
- + PROJECT_NAME, "BrokenFarm.java", "CDI Problem");
- assertTrue("Warnings node should contain only one record instead of "
- + warningTrees.length + " records.", warningTrees.length == 1);
-
- CDIUtil.openQuickFix(warningTrees[0], bot, util);
+
+ problemsTrees = ProblemsView.getFilteredWarningsTreeItems(bot,
+ "Multiple beans are eligible", "/" + PROJECT_NAME,
+ "BrokenFarm.java", "CDI Problem");
+ assertTrue(problemsTrees.length == 1);
+
+ CDIUtil.openQuickFix(problemsTrees[0], bot);
String qualifBean = null;
if (bot.table(0).cell(0, 0).contains("Animal")) {
qualifBean = "Animal";
- }else {
+ } else {
qualifBean = "Dog";
}
bot.activeShell().bot().button("Finish").click();
bot.sleep(Timing.time2S());
util.waitForNonIgnoredJobs();
assertFalse(bot.button("Add >").isEnabled());
- assertFalse(bot.button("Finish").isEnabled());
+ assertFalse(bot.button("Finish").isEnabled());
bot.table(0).click(bot.table(0).indexOf("Q1 - " + PACKAGE_NAME), 0);
assertTrue(bot.button("Add >").isEnabled());
assertFalse(bot.button("Finish").isEnabled());
bot.clickButton("Add >");
assertTrue(bot.button("Finish").isEnabled());
bot.clickButton("Finish");
-
+
bot.sleep(Timing.time2S());
util.waitForNonIgnoredJobs();
code = ed.toTextEditor().getText();
assertTrue(code.contains("@Inject @Q1 private Animal animal;"));
code = bot.editorByTitle(qualifBean + ".java").toTextEditor().getText();
assertTrue(code.contains("@Q1"));
- warningTrees = ProblemsView
- .getFilteredWarningsTreeItems(bot, "Multiple beans are eligible",
"/"
- + PROJECT_NAME, "BrokenFarm.java", "CDI Problem");
+ problemsTrees = ProblemsView.getFilteredWarningsTreeItems(bot,
+ "Multiple beans are eligible", "/" + PROJECT_NAME,
+ "BrokenFarm.java", "CDI Problem");
+ assertTrue(problemsTrees.length == 0);
+ }
+
+ @Test
+ public void testStereoscopeQF() {
+ CDIUtil.stereotype(PACKAGE_NAME, "S1", null, null, false, false, false,
+ false).finish();
+ util.waitForNonIgnoredJobs();
+ SWTBotEclipseEditor ed = bot.activeEditor().toTextEditor();
+ checkStartupWarnings(bot);
+ prepareStereoscope(ed);
+
+ // 1.QF -
https://issues.jboss.org/browse/JBIDE-7630
+ checkTargetAnnotation(ed);
+
+ // 2.QF -
https://issues.jboss.org/browse/JBIDE-7631
+ checkRetentionAnnotation(ed);
+
+ // 3.QF -
https://issues.jboss.org/browse/JBIDE-7634
+ checkNamedAnnotation(ed);
+
+ // 4.QF -
https://issues.jboss.org/browse/JBIDE-7640
+ checkTypedAnnotation(ed);
+ }
+
+ @Ignore("not ready yet")
+ @Test
+ public void testQualifiersQF() {
+ /*
+ * 2 QF
+ */
+
+ CDIUtil.qualifier(PACKAGE_NAME, "Q1", false, false).finish();
+ util.waitForNonIgnoredJobs();
+ SWTBotEditor ed = bot.activeEditor();
+ ed.setFocus();
+ }
+
+ @Ignore("not ready yet")
+ @Test
+ public void testScopeQF() {
+ /*
+ * 2 QF
+ */
+
+ CDIUtil.scope(PACKAGE_NAME, "Scope1", false, false, true, false)
+ .finish();
+ util.waitForNonIgnoredJobs();
+ SWTBotEditor ed = bot.activeEditor();
+ ed.setFocus();
+ }
+
+ @Ignore("not ready yet")
+ @Test
+ public void testBeanQF() {
+ /*
+ * 5 QF
+ */
+
+ CDIUtil.bean(PACKAGE_NAME, "MyBean", true, false, false, false, null,
+ null, null, null).finish();
+ util.waitForNonIgnoredJobs();
+ SWTBotEditor ed = bot.activeEditor();
+ ed.setFocus();
+ }
+
+ @Ignore("not ready yet")
+ @Test
+ public void testInterDecorQF() {
+ /*
+ * 5 QF
+ *
+ * tu vytvorim jednotnu metodu, s jednym parametrom - ci iner alebo
+ * decor jediny zmysel pri vytvarani komponenty, potom by to malo byt
+ * rovnake
+ */
+ }
+
+ private void prepareStereoscope(SWTBotEclipseEditor ed) {
+ CDIUtil.replaceInEditor(ed, bot, "@Target({ TYPE, METHOD, FIELD })",
+ "@Target({TYPE, METHOD, FIELD})");
+ }
+
+ private void prepareNamedAnnotation(SWTBotEclipseEditor ed, boolean add) {
+ if (add) {
+ ed.toTextEditor().insertText(ed.getLineCount()-4 , 0,
+ "@Named(\"Stereoscope\")" + LINE_SEPARATOR);
+ ed.toTextEditor().insertText(6 , 0, "import javax.inject.Named;" +
LINE_SEPARATOR);
+ } else {
+ CDIUtil.replaceInEditor(ed, bot, "@Named", "");
+ CDIUtil.replaceInEditor(ed, bot,
+ "import javax.inject.Named;", "");
+ }
+ bot.sleep(Timing.time2S());
+ ed.save();
+ }
+
+ private void prepareTypedAnnotation(SWTBotEclipseEditor ed) {
+ ed.toTextEditor().insertText(ed.getLineCount()-4 , 0,
+ "@Typed" + LINE_SEPARATOR);
+ ed.toTextEditor().insertText(6 , 0, "import javax.enterprise.inject.Typed;" +
LINE_SEPARATOR);
+ bot.sleep(Timing.time2S());
+ ed.save();
+ }
+
+ private void checkStartupWarnings(SWTBotExt bot) {
+ SWTBotTreeItem[] warningTrees = ProblemsView
+ .getFilteredWarningsTreeItems(bot, null, "/" + PROJECT_NAME,
+ "S1.java", "CDI Problem");
assertTrue(warningTrees.length == 0);
}
+
+ private void checkTargetAnnotation(SWTBotEclipseEditor ed) {
+ checkTargetAnnotWithReplac(ed, "@Target({TYPE, FIELD})");
+ checkTargetAnnotWithReplac(ed, "");
+ }
+
+ private void checkTargetAnnotWithReplac(SWTBotEclipseEditor ed, String replacement) {
+ CDIUtil.replaceInEditor(ed, bot, "@Target({TYPE, METHOD, FIELD})",
+ replacement);
+ CDIUtil.replaceInEditor(ed, bot,
+ "import static java.lang.annotation.ElementType.METHOD;", "");
+ if (replacement.equals("")) {
+ CDIUtil.replaceInEditor(ed, bot,
+ "import java.lang.annotation.Target;", "");
+ CDIUtil.replaceInEditor(ed, bot,
+ "import static java.lang.annotation.ElementType.TYPE;", "");
+ CDIUtil.replaceInEditor(ed, bot,
+ "import static java.lang.annotation.ElementType.FIELD;", "");
+ }
+ checkSimpleQuickFix(ANNOTATIONS.TARGET, replacement, ed);
+ }
+
+ private void checkRetentionAnnotation(SWTBotEclipseEditor ed) {
+ checkRetenAnnotWithReplac(ed, "@Retention(CLASS)");
+ checkRetenAnnotWithReplac(ed, "");
+ }
+
+ private void checkRetenAnnotWithReplac(SWTBotEclipseEditor ed, String replacement) {
+ CDIUtil.replaceInEditor(ed, bot, "@Retention(RUNTIME)", replacement);
+ if (replacement.equals("@Retention(CLASS)")) {
+ CDIUtil.replaceInEditor(ed, bot,
+ "import static java.lang.annotation.RetentionPolicy.RUNTIME;",
+ "import static java.lang.annotation.RetentionPolicy.CLASS;");
+ } else {
+ CDIUtil.replaceInEditor(ed, bot,
+ "import static java.lang.annotation.RetentionPolicy.RUNTIME;",
+ "");
+ CDIUtil.replaceInEditor(ed, bot,
+ "import java.lang.annotation.Retention;", "");
+ }
+
+ checkSimpleQuickFix(ANNOTATIONS.RETENTION, replacement, ed);
+ }
+
+ private void checkNamedAnnotation(SWTBotEclipseEditor ed) {
+ prepareNamedAnnotation(ed, true);
+ checkNamedAnnotWithReplac(ed, "@Named");
+ prepareNamedAnnotation(ed, false);
+ prepareNamedAnnotation(ed, true);
+ checkNamedAnnotWithReplac(ed, "");
+ }
+
+ private void checkNamedAnnotWithReplac(SWTBotEclipseEditor ed, String replacement) {
+ checkSimpleQuickFix(ANNOTATIONS.NAMED, replacement, ed);
+ }
+
+ private void checkTypedAnnotation(SWTBotEclipseEditor ed) {
+ prepareTypedAnnotation(ed);
+ checkTypedAnnotWithReplac(ed, "");
+ }
+
+ private void checkTypedAnnotWithReplac(SWTBotEclipseEditor ed, String replacement) {
+ checkSimpleQuickFix(ANNOTATIONS.TYPED, replacement, ed);
+ }
+
+ private void checkSimpleQuickFix(ANNOTATIONS annonType, String replacement,
+ SWTBotEclipseEditor ed) {
+ if (annonType == ANNOTATIONS.NAMED || annonType == ANNOTATIONS.TYPED) {
+ problemsTrees = ProblemsView.getFilteredErrorsTreeItems(bot, null, "/"
+ + PROJECT_NAME, "S1.java", "CDI Problem");
+ } else {
+ problemsTrees = ProblemsView.getFilteredWarningsTreeItems(bot, null, "/"
+ + PROJECT_NAME, "S1.java", "CDI Problem");
+ }
+ assertTrue(problemsTrees.length == 1);
+ if (annonType != ANNOTATIONS.NAMED) {
+ CDIUtil.resolveQuickFix(problemsTrees[0], bot, util);
+ if (annonType == ANNOTATIONS.RETENTION) {
+ if (replacement.equals("@Retention(CLASS)")) {
+ CDIUtil.replaceInEditor(ed, bot,
+ "import static
java.lang.annotation.RetentionPolicy.CLASS;","");
+ }
+ }
+ } else {
+ if (replacement.equals("@Named")) {
+ CDIUtil.resolveQuickFix(problemsTrees[0], bot, util);
+ } else {
+ CDIUtil.openQuickFix(problemsTrees[0], bot);
+ bot.table(0).click(1, 0);
+ assertFalse(bot.button("Finish").isEnabled());
+ bot.table(1).getTableItem(0).check();
+ assertTrue(bot.button("Finish").isEnabled());
+ bot.clickButton("Finish");
+ bot.sleep(Timing.time2S());
+ util.waitForNonIgnoredJobs();
+ }
+ }
+ problemsTrees = ProblemsView.getFilteredWarningsTreeItems(bot, null, "/"
+ + PROJECT_NAME, "S1.java", "CDI Problem");
+ assertTrue(problemsTrees.length == 0);
+ problemsTrees = ProblemsView.getFilteredErrorsTreeItems(bot, null, "/"
+ + PROJECT_NAME, "S1.java", "CDI Problem");
+ assertTrue(problemsTrees.length == 0);
+ }
+
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/CDIUtil.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/CDIUtil.java 2011-08-23
08:56:42 UTC (rev 34163)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/CDIUtil.java 2011-08-23
11:18:02 UTC (rev 34164)
@@ -7,6 +7,7 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
import org.eclipse.swtbot.swt.finder.results.Result;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
@@ -46,12 +47,12 @@
util.waitForNonIgnoredJobs();
}
- public static void openQuickFix(SWTBotTreeItem item, SWTBotExt bot, SWTUtilExt util) {
+ public static void openQuickFix(SWTBotTreeItem item, SWTBotExt bot) {
nodeContextMenu(bot.tree(), item, "Quick Fix").click();
}
public static void resolveQuickFix(SWTBotTreeItem item, SWTBotExt bot, SWTUtilExt util)
{
- openQuickFix(item, bot, util);
+ openQuickFix(item, bot);
bot.activeShell().bot().button("Finish").click();
bot.sleep(Timing.time2S());
util.waitForNonIgnoredJobs();
@@ -67,6 +68,39 @@
if (closeEdit) classEdit.close();
}
+ public static void replaceInEditor(SWTBotEclipseEditor ed, SWTBotExt bot, String target,
String replacement) {
+ ed.selectRange(0, 0, ed.getText().length());
+ ed.setText(ed.getText().replace(target +
+ (replacement.equals("")?System.getProperty("line.separator"):""),
+ replacement));
+ bot.sleep(Timing.time3S());
+ ed.save();
+ }
+
+ public static void disableFolding(SWTBotExt bot, SWTUtilExt util) {
+ editFolding(bot, util, false);
+ }
+
+ public static void enableFolding(SWTBotExt bot, SWTUtilExt util) {
+ editFolding(bot, util, true);
+ }
+
+ public static void editFolding(SWTBotExt bot, SWTUtilExt util, boolean select) {
+ bot.menu("Window").menu("Preferences").click();
+ bot.shell("Preferences").activate();
+ SWTBotTreeItem item = bot.tree(0).expandNode("Java", "Editor");
+ item.select("Folding");
+ SWTBotCheckBox foldCheckBox = bot.checkBox("Enable folding");
+ if (select) {
+ foldCheckBox.select();
+ } else {
+ foldCheckBox.deselect();
+ }
+ bot.button("OK").click();
+ bot.sleep(Timing.time2S());
+ util.waitForNonIgnoredJobs();
+ }
+
public static SWTBotMenu nodeContextMenu(final SWTBotTree tree,
SWTBotTreeItem item, final String... menu) {
assert menu.length > 0;
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/WSAllBotTests.launch
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/WSAllBotTests.launch 2011-08-23 08:56:42
UTC (rev 34163)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/WSAllBotTests.launch 2011-08-23 11:18:02
UTC (rev 34164)
@@ -39,7 +39,7 @@
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"
value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS"
value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms256m -Xmx1024m
-Dswtbot.test.properties.file=${env_var:HOME}/swtbot.properties
-Dusage_reporting_enabled=false"/>
<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product"
value="org.jboss.tools.tests.product"/>
+<stringAttribute key="product"
value="org.eclipse.platform.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2011-08-23
08:56:42 UTC (rev 34163)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2011-08-23
11:18:02 UTC (rev 34164)
@@ -38,6 +38,7 @@
* @author Lukas Jungmann
* @author jjankovi
*/
+(a)RunWith(RequirementAwareSuite.class)
@SuiteClasses({
SampleWSTest.class,
BottomUpWSTest.class,
@@ -45,6 +46,5 @@
WsClientTest.class,
WsTesterTest.class
})
-(a)RunWith(RequirementAwareSuite.class)
public class WSAllBotTests {
}
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java 2011-08-23
08:56:42 UTC (rev 34163)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java 2011-08-23
11:18:02 UTC (rev 34164)
@@ -11,7 +11,6 @@
package org.jboss.tools.ws.ui.bot.test.jbt;
import java.io.IOException;
-import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.MessageFormat;
@@ -24,14 +23,15 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
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.ws.ui.bot.test.WSAllBotTests;
import org.jboss.tools.ws.ui.bot.test.uiutils.actions.NewSampleWSWizardAction;
import org.jboss.tools.ws.ui.bot.test.uiutils.actions.TreeItemAction;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.SampleWSWizard;
@@ -39,11 +39,13 @@
import org.jboss.tools.ws.ui.bot.test.utils.WSClient;
import org.jboss.tools.ws.ui.bot.test.wtp.WSTestBase;
import org.junit.AfterClass;
-import org.junit.Ignore;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
-@Require(server =
-@Server(), perspective = "Java EE")
+@Require(server=@Server(),perspective="Java EE")
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({ WSAllBotTests.class})
public class SampleWSTest extends WSTestBase {
private static final String SOAP_REQUEST = getSoapRequest("<ns1:sayHello
xmlns:ns1=\"http://{0}/\"><arg0>{1}</arg0></ns1:sayHello>");
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/WsTesterTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/WsTesterTest.java 2011-08-23
08:56:42 UTC (rev 34163)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/WsTesterTest.java 2011-08-23
11:18:02 UTC (rev 34164)
@@ -26,8 +26,10 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ws.ui.bot.test.WSAllBotTests;
import org.jboss.tools.ws.ui.bot.test.widgets.SelectWSDLDialog;
import org.jboss.tools.ws.ui.bot.test.widgets.WsTesterView;
import org.jboss.tools.ws.ui.bot.test.widgets.WsTesterView.Request_Arg_Type;
@@ -35,6 +37,8 @@
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
/**
* Tests for Web Service Tester
@@ -42,6 +46,8 @@
* @author jlukas
*/
@Require(perspective = "Java")
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({ WSAllBotTests.class})
public class WsTesterTest extends SWTTestExt {
private static final Logger L = Logger.getLogger(WsTesterTest.class.getName());
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/BottomUpWSTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/BottomUpWSTest.java 2011-08-23
08:56:42 UTC (rev 34163)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/BottomUpWSTest.java 2011-08-23
11:18:02 UTC (rev 34164)
@@ -10,13 +10,19 @@
******************************************************************************/
package org.jboss.tools.ws.ui.bot.test.wtp;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ws.ui.bot.test.WSAllBotTests;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.WsWizardBase.Slider_Level;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
@Require(server=@Server(),perspective="Java EE")
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({ WSAllBotTests.class})
public class BottomUpWSTest extends WSTestBase {
//http://localhost:8080/BottomUpWS/ClassA?wsdl
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/TopDownWSTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/TopDownWSTest.java 2011-08-23
08:56:42 UTC (rev 34163)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/TopDownWSTest.java 2011-08-23
11:18:02 UTC (rev 34164)
@@ -10,12 +10,18 @@
******************************************************************************/
package org.jboss.tools.ws.ui.bot.test.wtp;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ws.ui.bot.test.WSAllBotTests;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.WsWizardBase.Slider_Level;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
@Require(server=@Server(),perspective="Java EE")
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({ WSAllBotTests.class})
public class TopDownWSTest extends WSTestBase {
@Override
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/WsClientTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/WsClientTest.java 2011-08-23
08:56:42 UTC (rev 34163)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/wtp/WsClientTest.java 2011-08-23
11:18:02 UTC (rev 34164)
@@ -12,13 +12,19 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ws.ui.bot.test.WSAllBotTests;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.WsWizardBase.Slider_Level;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
@Require(server=@Server(),perspective="Java EE")
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({ WSAllBotTests.class})
public class WsClientTest extends WSTestBase {
@Override