[jbosstools-commits] JBoss Tools SVN: r41145 - in trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test: entity and 11 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri May 18 05:32:48 EDT 2012
Author: ljelinko
Date: 2012-05-18 05:32:48 -0400 (Fri, 18 May 2012)
New Revision: 41145
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Runtime.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/RuntimeMatcher.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectRuntimeTemplate.java
Removed:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Server.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/ServerMatcher.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectServerTemplate.java
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/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
Log:
Renamed *Server* to *Runtime*
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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -7,30 +7,28 @@
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.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+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.condition.TaskDuration;
-import org.jboss.tools.ui.bot.ext.logging.WidgetsLogger;
public class SearchingForRuntimesDialog {
- public List<Server> getServers(){
- List<Server> servers = new ArrayList<Server>();
+ public List<Runtime> getRuntimes(){
+ List<Runtime> runtimes = new ArrayList<Runtime>();
- WidgetsLogger.log();
SWTBot bot = SWTBotFactory.getBot().shell("Searching for runtimes...").bot();
bot.waitUntil(new RuntimeSearchedFinished(bot), TaskDuration.LONG.getTimeout());
SWTBotTree tree = bot.tree();
for (int i = 0; i < tree.rowCount(); i++){
- Server server = new Server();
- server.setName(tree.cell(i, 0));
- server.setVersion(tree.cell(i, 1));
- server.setType(tree.cell(i, 2));
- server.setLocation(tree.cell(i, 3));
- servers.add(server);
+ 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));
+ runtimes.add(runtime);
}
- return servers;
+ return runtimes;
}
public void ok(){
Copied: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Runtime.java (from rev 40326, trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Server.java)
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Runtime.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Runtime.java 2012-05-18 09:32:48 UTC (rev 41145)
@@ -0,0 +1,94 @@
+package org.jboss.tools.runtime.as.ui.bot.test.entity;
+
+public class Runtime {
+
+ private String name;
+
+ private String version;
+
+ private String type;
+
+ private String location;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result
+ + ((location == null) ? 0 : location.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ result = prime * result + ((version == null) ? 0 : version.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Runtime other = (Runtime) obj;
+ if (location == null) {
+ if (other.location != null)
+ return false;
+ } else if (!location.equals(other.location))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (type == null) {
+ if (other.type != null)
+ return false;
+ } else if (!type.equals(other.type))
+ return false;
+ if (version == null) {
+ if (other.version != null)
+ return false;
+ } else if (!version.equals(other.version))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "Runtime [name=" + name + ", version=" + version + ", type="
+ + type + ", location=" + location + "]";
+ }
+}
\ No newline at end of file
Deleted: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Server.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Server.java 2012-05-18 09:01:04 UTC (rev 41144)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Server.java 2012-05-18 09:32:48 UTC (rev 41145)
@@ -1,94 +0,0 @@
-package org.jboss.tools.runtime.as.ui.bot.test.entity;
-
-public class Server {
-
- String name;
-
- String version;
-
- String type;
-
- String location;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getLocation() {
- return location;
- }
-
- public void setLocation(String location) {
- this.location = location;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result
- + ((location == null) ? 0 : location.hashCode());
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- result = prime * result + ((type == null) ? 0 : type.hashCode());
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Server other = (Server) obj;
- if (location == null) {
- if (other.location != null)
- return false;
- } else if (!location.equals(other.location))
- return false;
- if (name == null) {
- if (other.name != null)
- return false;
- } else if (!name.equals(other.name))
- return false;
- if (type == null) {
- if (other.type != null)
- return false;
- } else if (!type.equals(other.type))
- return false;
- if (version == null) {
- if (other.version != null)
- return false;
- } else if (!version.equals(other.version))
- return false;
- return true;
- }
-
- @Override
- public String toString() {
- return "Server [name=" + name + ", version=" + version + ", type="
- + type + ", location=" + location + "]";
- }
-}
\ No newline at end of file
Copied: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/RuntimeMatcher.java (from rev 40326, trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/ServerMatcher.java)
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/RuntimeMatcher.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/RuntimeMatcher.java 2012-05-18 09:32:48 UTC (rev 41145)
@@ -0,0 +1,24 @@
+package org.jboss.tools.runtime.as.ui.bot.test.matcher;
+
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeMatcher;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+
+public class RuntimeMatcher extends TypeSafeMatcher<Runtime>{
+
+ private Runtime expected;
+
+ public RuntimeMatcher(Runtime expected) {
+ this.expected = expected;
+ }
+
+ @Override
+ public boolean matchesSafely(Runtime item) {
+ return expected.equals(item);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendValue(expected);
+ }
+}
Deleted: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/ServerMatcher.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/ServerMatcher.java 2012-05-18 09:01:04 UTC (rev 41144)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/matcher/ServerMatcher.java 2012-05-18 09:32:48 UTC (rev 41145)
@@ -1,24 +0,0 @@
-package org.jboss.tools.runtime.as.ui.bot.test.matcher;
-
-import org.hamcrest.Description;
-import org.hamcrest.TypeSafeMatcher;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-
-public class ServerMatcher extends TypeSafeMatcher<Server>{
-
- private Server expected;
-
- public ServerMatcher(Server expected) {
- this.expected = expected;
- }
-
- @Override
- public boolean matchesSafely(Server item) {
- return expected.equals(item);
- }
-
- @Override
- public void describeTo(Description description) {
- description.appendValue(expected);
- }
-}
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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -1,25 +1,25 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.eap4;
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
-public class DetectEAP4 extends DetectServerTemplate {
+public class DetectEAP4 extends DetectRuntimeTemplate {
public static final String SERVER_ID = "jboss-eap-4.3";
@Override
- protected String getServerID() {
+ protected String getRuntimeID() {
return SERVER_ID;
}
@Override
- protected Server getExpectedServer() {
- Server server = new Server();
- server.setName(getServerID());
+ protected Runtime getExpectedRuntime() {
+ Runtime server = new Runtime();
+ server.setName(getRuntimeID());
server.setType("EAP");
server.setVersion("4.3");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getRuntimeID()));
return server;
}
}
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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -1,25 +1,25 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.eap5;
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
-public class DetectEAP5 extends DetectServerTemplate {
+public class DetectEAP5 extends DetectRuntimeTemplate {
public static final String SERVER_ID = "jboss-eap-5.1";
@Override
- protected String getServerID() {
+ protected String getRuntimeID() {
return SERVER_ID;
}
@Override
- protected Server getExpectedServer() {
- Server server = new Server();
- server.setName(getServerID());
+ protected Runtime getExpectedRuntime() {
+ Runtime server = new Runtime();
+ server.setName(getRuntimeID());
server.setType("EAP");
server.setVersion("5.1");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getRuntimeID()));
return server;
}
}
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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -1,25 +1,25 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.eap6;
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
-public class DetectEAP6 extends DetectServerTemplate {
+public class DetectEAP6 extends DetectRuntimeTemplate {
public static final String SERVER_ID = "jboss-eap-6.0";
@Override
- protected String getServerID() {
+ protected String getRuntimeID() {
return SERVER_ID;
}
@Override
- protected Server getExpectedServer() {
- Server server = new Server();
- server.setName(getServerID());
+ protected Runtime getExpectedRuntime() {
+ Runtime server = new Runtime();
+ server.setName(getRuntimeID());
server.setType("EAP");
server.setVersion("6.0");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getRuntimeID()));
return 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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -1,25 +1,25 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.epp4;
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
-public class DetectEPP4 extends DetectServerTemplate {
+public class DetectEPP4 extends DetectRuntimeTemplate {
public static final String SERVER_ID = "jboss-epp-4.3";
@Override
- protected String getServerID() {
+ protected String getRuntimeID() {
return SERVER_ID;
}
@Override
- protected Server getExpectedServer() {
- Server server = new Server();
- server.setName(getServerID());
+ protected Runtime getExpectedRuntime() {
+ Runtime server = new Runtime();
+ server.setName(getRuntimeID());
server.setType("EPP");
server.setVersion("4.3");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getRuntimeID()));
return server;
}
}
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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -1,25 +1,25 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.epp5;
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
-public class DetectEPP5 extends DetectServerTemplate {
+public class DetectEPP5 extends DetectRuntimeTemplate {
public static final String SERVER_ID = "jboss-epp-5.2";
@Override
- protected String getServerID() {
+ protected String getRuntimeID() {
return SERVER_ID;
}
@Override
- protected Server getExpectedServer() {
- Server server = new Server();
- server.setName(getServerID());
+ protected Runtime getExpectedRuntime() {
+ Runtime server = new Runtime();
+ server.setName(getRuntimeID());
server.setType("EPP");
server.setVersion("5.2");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getRuntimeID()));
return server;
}
}
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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -1,25 +1,25 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.ewp5;
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
-public class DetectEWP5 extends DetectServerTemplate {
+public class DetectEWP5 extends DetectRuntimeTemplate {
public static final String SERVER_ID = "jboss-ewp-5.1";
@Override
- protected String getServerID() {
+ protected String getRuntimeID() {
return SERVER_ID;
}
@Override
- protected Server getExpectedServer() {
- Server server = new Server();
- server.setName(getServerID());
+ protected Runtime getExpectedRuntime() {
+ Runtime server = new Runtime();
+ server.setName(getRuntimeID());
server.setType("EWP");
server.setVersion("5.1");
- server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getRuntimeID()));
return server;
}
}
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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -1,21 +1,21 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.jboss7;
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
-public class DetectJBoss7 extends DetectServerTemplate {
+public class DetectJBoss7 extends DetectRuntimeTemplate {
public static final String SERVER_ID = "jboss-as-7.1.1.Final";
@Override
- protected String getServerID() {
+ protected String getRuntimeID() {
return SERVER_ID;
}
@Override
- protected Server getExpectedServer() {
- Server expectedServer = new Server();
+ protected Runtime getExpectedRuntime() {
+ Runtime expectedServer = new Runtime();
expectedServer.setName(SERVER_ID);
expectedServer.setVersion("7.1");
expectedServer.setType("AS");
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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -1,21 +1,21 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.soap5;
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
-public class DetectSOAP5 extends DetectServerTemplate {
+public class DetectSOAP5 extends DetectRuntimeTemplate {
public static final String SERVER_ID = "jboss-soa-p-5";
@Override
- protected String getServerID() {
+ protected String getRuntimeID() {
return SERVER_ID;
}
@Override
- protected Server getExpectedServer() {
- Server expectedServer = new Server();
+ protected Runtime getExpectedRuntime() {
+ Runtime expectedServer = new Runtime();
expectedServer.setName(SERVER_ID);
expectedServer.setVersion("5.2");
expectedServer.setType("SOA-P");
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-18 09:01:04 UTC (rev 41144)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -1,21 +1,21 @@
package org.jboss.tools.runtime.as.ui.bot.test.server.soap5.standalone;
import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectRuntimeTemplate;
-public class DetectSOAPStandalone5 extends DetectServerTemplate {
+public class DetectSOAPStandalone5 extends DetectRuntimeTemplate {
public static final String SERVER_ID = "jboss-soa-p-standalone-5";
@Override
- protected String getServerID() {
+ protected String getRuntimeID() {
return SERVER_ID;
}
@Override
- protected Server getExpectedServer() {
- Server expectedServer = new Server();
+ protected Runtime getExpectedRuntime() {
+ Runtime expectedServer = new Runtime();
expectedServer.setName(SERVER_ID);
expectedServer.setVersion("5.2");
expectedServer.setType("SOA-P-STD");
Copied: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectRuntimeTemplate.java (from rev 41142, trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectServerTemplate.java)
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectRuntimeTemplate.java (rev 0)
+++ 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-18 09:32:48 UTC (rev 41145)
@@ -0,0 +1,49 @@
+package org.jboss.tools.runtime.as.ui.bot.test.template;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+
+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;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
+import org.jboss.tools.runtime.as.ui.bot.test.matcher.RuntimeMatcher;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.junit.After;
+import org.junit.Test;
+
+/**
+ * Common scenario for runtime detection tests. It adds the runtime's installation
+ * folder to the runtime detection and checks if it is correctly recognized and created.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public abstract class DetectRuntimeTemplate extends SWTTestExt {
+
+ private RuntimeDetectionPreferencesDialog preferences;
+
+ private SearchingForRuntimesDialog searchingForRuntimesDialog;
+
+ protected abstract String getRuntimeID();
+
+ protected abstract Runtime getExpectedRuntime();
+
+ @Test
+ public void detectRuntime(){
+ preferences = new RuntimeDetectionPreferencesDialog();
+ preferences.open();
+ preferences.addPath(RuntimeProperties.getInstance().getRuntimePath(getRuntimeID()));
+ searchingForRuntimesDialog = preferences.search();
+
+ assertThat(searchingForRuntimesDialog.getRuntimes().size(), is(1));
+ assertThat(searchingForRuntimesDialog.getRuntimes().get(0), new RuntimeMatcher(getExpectedRuntime()));
+ }
+
+ @After
+ public void closePreferences(){
+ searchingForRuntimesDialog.ok();
+ preferences.removePath(RuntimeProperties.getInstance().getRuntimePath(getRuntimeID()));
+ preferences.ok();
+ }
+}
Deleted: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectServerTemplate.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectServerTemplate.java 2012-05-18 09:01:04 UTC (rev 41144)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectServerTemplate.java 2012-05-18 09:32:48 UTC (rev 41145)
@@ -1,49 +0,0 @@
-package org.jboss.tools.runtime.as.ui.bot.test.template;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-
-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;
-import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
-import org.jboss.tools.runtime.as.ui.bot.test.matcher.ServerMatcher;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.junit.After;
-import org.junit.Test;
-
-/**
- * Common scenario for server detection tests. It adds the server's installation
- * folder to the runtime detection and checks if it is correctly recognized and created.
- *
- * @author Lucia Jelinkova
- *
- */
-public abstract class DetectServerTemplate extends SWTTestExt {
-
- private RuntimeDetectionPreferencesDialog preferences;
-
- private SearchingForRuntimesDialog searchingForRuntimesDialog;
-
- protected abstract String getServerID();
-
- protected abstract Server getExpectedServer();
-
- @Test
- public void detectServer(){
- preferences = new RuntimeDetectionPreferencesDialog();
- preferences.open();
- preferences.addPath(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
- searchingForRuntimesDialog = preferences.search();
-
- assertThat(searchingForRuntimesDialog.getServers().size(), is(1));
- assertThat(searchingForRuntimesDialog.getServers().get(0), new ServerMatcher(getExpectedServer()));
- }
-
- @After
- public void closePreferences(){
- searchingForRuntimesDialog.ok();
- preferences.removePath(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
- preferences.ok();
- }
-}
More information about the jbosstools-commits
mailing list