Author: ljelinko
Date: 2012-05-22 07:34:47 -0400 (Tue, 22 May 2012)
New Revision: 41246
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/seam/seam22/DetectSeam22.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/seam/seam23/DetectSeam23.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap4/DetectEAP4.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap5/DetectEAP5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap6/DetectEAP6.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/epp4/DetectEPP4.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/epp5/DetectEPP5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/ewp5/DetectEWP5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/jboss7/DetectJBoss7.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/soap5/DetectSOAP5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/soap5/standalone/DetectSOAPStandalone5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectRuntimeTemplate.java
Log:
Added the possibility to specify more expected runtimes.
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -7,8 +7,10 @@
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.waits.ICondition;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
public class SearchingForRuntimesDialog {
@@ -20,12 +22,12 @@
bot.waitUntil(new RuntimeSearchedFinished(bot), TaskDuration.LONG.getTimeout());
SWTBotTree tree = bot.tree();
- for (int i = 0; i < tree.rowCount(); i++){
+ for (SWTBotTreeItem treeItem :
SWTEclipseExt.getAllTreeItemsRecursive(SWTBotFactory.getBot(), tree, true)) {
Runtime runtime = new Runtime();
- runtime.setName(tree.cell(i, 0));
- runtime.setVersion(tree.cell(i, 1));
- runtime.setType(tree.cell(i, 2));
- runtime.setLocation(tree.cell(i, 3));
+ runtime.setName(treeItem.cell(0));
+ runtime.setVersion(treeItem.cell(1));
+ runtime.setType(treeItem.cell(2));
+ runtime.setLocation(treeItem.cell(3));
runtimes.add(runtime);
}
return runtimes;
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/seam/seam22/DetectSeam22.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/seam/seam22/DetectSeam22.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/seam/seam22/DetectSeam22.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.seam.seam22;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -11,17 +14,17 @@
public static final String VERSION = "2.2.2.Final";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SEAM_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
- Runtime server = new Runtime();
- server.setName(getServerRuntimeID());
- server.setType("SEAM");
- server.setVersion(VERSION);
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
- return server;
+ protected List<Runtime> getExpectedRuntimes() {
+ Runtime seam = new Runtime();
+ seam.setName(getPathID());
+ seam.setType("SEAM");
+ seam.setVersion(VERSION);
+ seam.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
+ return Arrays.asList(seam);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/seam/seam23/DetectSeam23.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/seam/seam23/DetectSeam23.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/seam/seam23/DetectSeam23.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.seam.seam23;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -11,17 +14,17 @@
public static final String VERSION = "2.3.0.Beta1";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SEAM_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
- Runtime server = new Runtime();
- server.setName(getServerRuntimeID());
- server.setType("SEAM");
- server.setVersion(VERSION);
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
- return server;
+ protected List<Runtime> getExpectedRuntimes() {
+ Runtime seam = new Runtime();
+ seam.setName(getPathID());
+ seam.setType("SEAM");
+ seam.setVersion(VERSION);
+ seam.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
+ return Arrays.asList(seam);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap4/DetectEAP4.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap4/DetectEAP4.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap4/DetectEAP4.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.eap4;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -9,17 +12,24 @@
public static final String SERVER_ID = "jboss-eap-4.3";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SERVER_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
+ protected List<Runtime> getExpectedRuntimes() {
Runtime server = new Runtime();
- server.setName(getServerRuntimeID());
+ server.setName(getPathID());
server.setType("EAP");
server.setVersion("4.3");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
- return server;
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
+
+ Runtime seam = new Runtime();
+ seam.setName("seam2");
+ seam.setType("SEAM");
+ seam.setVersion("2.0.2-FP_SEC1");
+ seam.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()) +
"/seam2");
+
+ return Arrays.asList(server, seam);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap5/DetectEAP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap5/DetectEAP5.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap5/DetectEAP5.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.eap5;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -9,17 +12,24 @@
public static final String SERVER_ID = "jboss-eap-5.1";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SERVER_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
+ protected List<Runtime> getExpectedRuntimes() {
Runtime server = new Runtime();
- server.setName(getServerRuntimeID());
+ server.setName(getPathID());
server.setType("EAP");
server.setVersion("5.1");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
- return server;
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
+
+ Runtime seam = new Runtime();
+ seam.setName("seam");
+ seam.setType("SEAM");
+ seam.setVersion("2.2.5.EAP5");
+ seam.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()) +
"/seam");
+
+ return Arrays.asList(server, seam);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap6/DetectEAP6.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap6/DetectEAP6.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/eap6/DetectEAP6.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.eap6;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -9,17 +12,17 @@
public static final String SERVER_ID = "jboss-eap-6.0";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SERVER_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
+ protected List<Runtime> getExpectedRuntimes() {
Runtime server = new Runtime();
- server.setName(getServerRuntimeID());
+ server.setName(getPathID());
server.setType("EAP");
server.setVersion("6.0");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
- return server;
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
+ return Arrays.asList(server);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/epp4/DetectEPP4.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/epp4/DetectEPP4.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/epp4/DetectEPP4.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.epp4;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -9,17 +12,24 @@
public static final String SERVER_ID = "jboss-epp-4.3";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SERVER_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
+ protected List<Runtime> getExpectedRuntimes() {
Runtime server = new Runtime();
- server.setName(getServerRuntimeID());
+ server.setName(getPathID());
server.setType("EPP");
server.setVersion("4.3");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
- return server;
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
+
+ Runtime seam = new Runtime();
+ seam.setName("seam2");
+ seam.setType("SEAM");
+ seam.setVersion("2.0.2-FP_SEC1");
+ seam.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()) +
"/seam2");
+
+ return Arrays.asList(server, seam);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/epp5/DetectEPP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/epp5/DetectEPP5.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/epp5/DetectEPP5.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.epp5;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -9,17 +12,24 @@
public static final String SERVER_ID = "jboss-epp-5.2";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SERVER_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
+ protected List<Runtime> getExpectedRuntimes() {
Runtime server = new Runtime();
- server.setName(getServerRuntimeID());
+ server.setName(getPathID());
server.setType("EPP");
server.setVersion("5.2");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
- return server;
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
+
+ Runtime seam = new Runtime();
+ seam.setName("seam");
+ seam.setType("SEAM");
+ seam.setVersion("2.2.4.EAP5");
+ seam.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()) +
"/seam");
+
+ return Arrays.asList(server, seam);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/ewp5/DetectEWP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/ewp5/DetectEWP5.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/ewp5/DetectEWP5.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.ewp5;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -9,17 +12,24 @@
public static final String SERVER_ID = "jboss-ewp-5.1";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SERVER_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
+ protected List<Runtime> getExpectedRuntimes() {
Runtime server = new Runtime();
- server.setName(getServerRuntimeID());
+ server.setName(getPathID());
server.setType("EWP");
server.setVersion("5.1");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
- return server;
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
+
+ Runtime seam = new Runtime();
+ seam.setName("seam");
+ seam.setType("SEAM");
+ seam.setVersion("2.2.5.EAP5");
+ seam.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()) +
"/seam");
+
+ return Arrays.asList(server, seam);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/jboss7/DetectJBoss7.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/jboss7/DetectJBoss7.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/jboss7/DetectJBoss7.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.jboss7;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -9,17 +12,17 @@
public static final String SERVER_ID = "jboss-as-7.1.1.Final";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SERVER_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
+ protected List<Runtime> getExpectedRuntimes() {
Runtime expectedServer = new Runtime();
expectedServer.setName(SERVER_ID);
expectedServer.setVersion("7.1");
expectedServer.setType("AS");
expectedServer.setLocation(RuntimeProperties.getInstance().getRuntimePath(SERVER_ID));
- return expectedServer;
+ return Arrays.asList(expectedServer);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/soap5/DetectSOAP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/soap5/DetectSOAP5.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/soap5/DetectSOAP5.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.soap5;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -9,17 +12,24 @@
public static final String SERVER_ID = "jboss-soa-p-5";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SERVER_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
- Runtime expectedServer = new Runtime();
- expectedServer.setName(SERVER_ID);
- expectedServer.setVersion("5.2");
- expectedServer.setType("SOA-P");
- expectedServer.setLocation(RuntimeProperties.getInstance().getRuntimePath(SERVER_ID));
- return expectedServer;
+ protected List<Runtime> getExpectedRuntimes() {
+ Runtime server = new Runtime();
+ server.setName(SERVER_ID);
+ server.setVersion("5.2");
+ server.setType("SOA-P");
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(SERVER_ID));
+
+ Runtime seam = new Runtime();
+ seam.setName("seam");
+ seam.setType("SEAM");
+ seam.setVersion("2.2.4.EAP5");
+ seam.setLocation(RuntimeProperties.getInstance().getRuntimePath(getPathID()) +
"/seam");
+
+ return Arrays.asList(server, seam);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/soap5/standalone/DetectSOAPStandalone5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/soap5/standalone/DetectSOAPStandalone5.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/server/soap5/standalone/DetectSOAPStandalone5.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,5 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.soap5.standalone;
+import java.util.Arrays;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
@@ -9,17 +12,17 @@
public static final String SERVER_ID = "jboss-soa-p-standalone-5";
@Override
- protected String getServerRuntimeID() {
+ protected String getPathID() {
return SERVER_ID;
}
@Override
- protected Runtime getExpectedServerRuntime() {
+ protected List<Runtime> getExpectedRuntimes() {
Runtime expectedServer = new Runtime();
expectedServer.setName(SERVER_ID);
expectedServer.setVersion("5.2");
expectedServer.setType("SOA-P-STD");
expectedServer.setLocation(RuntimeProperties.getInstance().getRuntimePath(SERVER_ID));
- return expectedServer;
+ return Arrays.asList(expectedServer);
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectRuntimeTemplate.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectRuntimeTemplate.java 2012-05-22
11:29:37 UTC (rev 41245)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectRuntimeTemplate.java 2012-05-22
11:34:47 UTC (rev 41246)
@@ -1,8 +1,11 @@
package org.jboss.tools.runtime.as.ui.bot.test.template;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.is;
+import java.util.List;
+
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
import
org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences.RuntimeDetectionPreferencesDialog;
import
org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences.SearchingForRuntimesDialog;
@@ -25,25 +28,29 @@
private SearchingForRuntimesDialog searchingForRuntimesDialog;
- protected abstract String getServerRuntimeID();
+ protected abstract String getPathID();
- protected abstract Runtime getExpectedServerRuntime();
+ protected abstract List<Runtime> getExpectedRuntimes();
@Test
public void detectRuntime(){
preferences = new RuntimeDetectionPreferencesDialog();
preferences.open();
- preferences.addPath(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
+ preferences.addPath(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
searchingForRuntimesDialog = preferences.search();
- assertThat(searchingForRuntimesDialog.getRuntimes().size(), is(1));
- assertThat(searchingForRuntimesDialog.getRuntimes().get(0), new
RuntimeMatcher(getExpectedServerRuntime()));
+ List<Runtime> runtimes = searchingForRuntimesDialog.getRuntimes();
+
+ assertThat(runtimes.size(), is(getExpectedRuntimes().size()));
+ for (Runtime runtime : getExpectedRuntimes()){
+ assertThat(runtimes, hasItem(new RuntimeMatcher(runtime)));
+ }
}
@After
public void closePreferences(){
searchingForRuntimesDialog.ok();
- preferences.removePath(RuntimeProperties.getInstance().getRuntimePath(getServerRuntimeID()));
+ preferences.removePath(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
preferences.ok();
}
}