[jbosstools-commits] JBoss Tools SVN: r44046 - trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Wed Sep 26 11:04:09 EDT 2012
Author: ljelinko
Date: 2012-09-26 11:04:09 -0400 (Wed, 26 Sep 2012)
New Revision: 44046
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectRuntimeTemplate.java
Log:
Changed removing of runtimes to use API instead of bot.
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-09-26 14:55:10 UTC (rev 44045)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectRuntimeTemplate.java 2012-09-26 15:04:09 UTC (rev 44046)
@@ -10,6 +10,8 @@
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.runtime.core.model.RuntimePath;
+import org.jboss.tools.runtime.ui.RuntimeUIActivator;
import org.junit.After;
import org.junit.Test;
@@ -31,10 +33,11 @@
@Test
public void detectRuntime(){
searchingForRuntimesDialog = addPath(RuntimeProperties.getInstance().getRuntimePath(getPathID()));
-
+
List<Runtime> runtimes = searchingForRuntimesDialog.getRuntimes();
-
+
assertThat(runtimes.size(), is(getExpectedRuntimes().size()));
+
for (Runtime runtime : getExpectedRuntimes()){
assertThat(runtimes, hasItem(new RuntimeMatcher(runtime)));
}
@@ -43,7 +46,13 @@
@After
public void closePreferences(){
searchingForRuntimesDialog.ok();
- runtimeDetectionPreferences.removeAllPaths();
+// runtimeDetectionPreferences.removeAllPaths();
runtimeDetectionPreferences.ok();
+
+ // this call to API is due to wrongly functioning of Remove button. Once it is fixed
+ // it should be changed back to removing via SWTBot
+ for (RuntimePath path : RuntimeUIActivator.getDefault().getModel().getRuntimePaths()){
+ RuntimeUIActivator.getDefault().getModel().removeRuntimePath(path);
+ }
}
}
More information about the jbosstools-commits
mailing list