Author: vpakan(a)redhat.com
Date: 2012-04-24 08:10:13 -0400 (Tue, 24 Apr 2012)
New Revision: 40450
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
Removed:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
Log:
Added javadoc and remove some tests from test suite Suite.java.
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,66 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.ui.bot.ext.test;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.ui.bot.ext.test";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
- * )
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,66 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.ui.bot.ext.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,32 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.junit.Test;
-
-
-@Require(server=@Server(),perspective="Java EE")
-public class AnnotatedDefaultServer extends SWTTestExt {
-
- @Test
- public void configuredState() {
- assertTrue(configuredState.getServer().isRunning);
- assertTrue(configuredState.getServer().isConfigured);
- assertNotNull(configuredState.getServer().version);
- assertNotNull(configuredState.getServer().type);
- assertNotNull(configuredState.getServer().name);
- assertNotNull(configuredState.getServer().withJavaVersion);
- }
-
- @Test
- public void serverExists() {
- ServerUtil.serverExists();
- }
-
- @Test
- public void serverRunning() {
- ServerUtil.serverRunning();
- }
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,51 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.junit.Test;
+/**
+ * Parent test for tests using server in default state.
+ * @author lzoubek
+ *
+ */
+@Require(server=@Server(),perspective="Java EE")
+public class AnnotatedDefaultServer extends SWTTestExt {
+ /**
+ * Checks server state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+ /**
+ * Checks server existence
+ */
+ @Test
+ public void serverExists() {
+ ServerUtil.serverExists();
+ }
+ /**
+ * Checks if server is running
+ */
+ @Test
+ public void serverRunning() {
+ ServerUtil.serverRunning();
+ }
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,39 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.junit.Test;
-
-@Require(server=(a)Server(state=ServerState.Disabled))
-public class AnnotatedDisabledServer extends SWTTestExt {
-
- @Test
- public void configuredState() {
- assertTrue(!configuredState.getServer().isRunning);
- assertTrue(!configuredState.getServer().isConfigured);
- assertNull(configuredState.getServer().version);
- assertNull(configuredState.getServer().type);
- assertNull(configuredState.getServer().name);
- assertNull(configuredState.getServer().withJavaVersion);
- }
-
- @Test
- public void serverDoesNotExist() {
- assertTrue(!servers.show().bot().tree().hasItems());
- }
-
- @Test
- public void runtimeDoesNotExist() {
- SWTBot wiz = open
- .preferenceOpen(ActionItem.Preference.ServerRuntimeEnvironments.LABEL);
- SWTBotTable tbRuntimeEnvironments = bot.table();
- assertTrue(tbRuntimeEnvironments.rowCount()==0);
- open.closeCancel(wiz);
- }
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,60 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.junit.Test;
+/**
+ * Parent test for tests using server in disabled state.
+ * n state when server is not defined within workspace.
+ * @author lzoubek
+ *
+ */
+@Require(server=(a)Server(state=ServerState.Disabled))
+public class AnnotatedDisabledServer extends SWTTestExt {
+ /**
+ * Checks server state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(!configuredState.getServer().isRunning);
+ assertTrue(!configuredState.getServer().isConfigured);
+ assertNull(configuredState.getServer().version);
+ assertNull(configuredState.getServer().type);
+ assertNull(configuredState.getServer().name);
+ assertNull(configuredState.getServer().withJavaVersion);
+ }
+ /**
+ * Checks server doesn't exist
+ */
+ @Test
+ public void serverDoesNotExist() {
+ assertTrue(!servers.show().bot().tree().hasItems());
+ }
+ /**
+ * Checks server runtime doesn't exist
+ */
+ @Test
+ public void runtimeDoesNotExist() {
+ SWTBot wiz = open
+ .preferenceOpen(ActionItem.Preference.ServerRuntimeEnvironments.LABEL);
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ assertTrue(tbRuntimeEnvironments.rowCount()==0);
+ open.closeCancel(wiz);
+ }
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,33 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.junit.Test;
-
-
-@Require(server=(a)Server(type=ServerType.EPP),perspective="Java EE")
-public class AnnotatedEPPServer extends SWTTestExt {
-
- @Test
- public void configuredState() {
- assertTrue(configuredState.getServer().isRunning);
- assertTrue(configuredState.getServer().isConfigured);
- assertNotNull(configuredState.getServer().version);
- assertNotNull(configuredState.getServer().type);
- assertNotNull(configuredState.getServer().name);
- assertNotNull(configuredState.getServer().withJavaVersion);
- }
-
- @Test
- public void serverExists() {
- ServerUtil.serverExists();
- }
-
- @Test
- public void serverRunning() {
- ServerUtil.serverRunning();
- }
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,52 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.junit.Test;
+/**
+ * Parent test for tests using EPP server in default state.
+ * @author lzoubek
+ *
+ */
+@Require(server=(a)Server(type=ServerType.EPP),perspective="Java EE")
+public class AnnotatedEPPServer extends SWTTestExt {
+ /**
+ * Checks server state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+ /**
+ * Checks server existence
+ */
+ @Test
+ public void serverExists() {
+ ServerUtil.serverExists();
+ }
+ /**
+ * Checks if server is running
+ */
+ @Test
+ public void serverRunning() {
+ ServerUtil.serverRunning();
+ }
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,33 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.junit.Test;
-
-
-@Require(server=(a)Server(type=ServerType.JbossAS),perspective="Java EE")
-public class AnnotatedJbossASServer extends SWTTestExt {
-
- @Test
- public void configuredState() {
- assertTrue(configuredState.getServer().isRunning);
- assertTrue(configuredState.getServer().isConfigured);
- assertNotNull(configuredState.getServer().version);
- assertNotNull(configuredState.getServer().type);
- assertNotNull(configuredState.getServer().name);
- assertNotNull(configuredState.getServer().withJavaVersion);
- }
-
- @Test
- public void serverExists() {
- ServerUtil.serverExists();
- }
-
- @Test
- public void serverRunning() {
- ServerUtil.serverRunning();
- }
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,52 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.junit.Test;
+/**
+ * Parent test for tests using JBoss application server in default state.
+ * @author lzoubek
+ *
+ */
+@Require(server=(a)Server(type=ServerType.JbossAS),perspective="Java EE")
+public class AnnotatedJbossASServer extends SWTTestExt {
+ /**
+ * Checks server state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+ /**
+ * Checks server existence
+ */
+ @Test
+ public void serverExists() {
+ ServerUtil.serverExists();
+ }
+ /**
+ * Checks if server is running
+ */
+ @Test
+ public void serverRunning() {
+ ServerUtil.serverRunning();
+ }
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,30 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerLocation;
-import org.junit.Test;
-@Require(server=(a)Server(location=ServerLocation.Local),perspective="Java EE")
-public class AnnotatedLocalServer extends SWTTestExt{
- @Test
- public void configuredState() {
- assertTrue(configuredState.getServer().isRunning);
- assertTrue(configuredState.getServer().isConfigured);
- assertNotNull(configuredState.getServer().version);
- assertNotNull(configuredState.getServer().type);
- assertNotNull(configuredState.getServer().name);
- assertNotNull(configuredState.getServer().withJavaVersion);
- assertTrue(configuredState.getServer().isLocal);
- }
-
- @Test
- public void serverExists() {
- ServerUtil.serverExists();
- }
-
- @Test
- public void serverRunning() {
- ServerUtil.serverRunning();
- }
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,51 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+/**
+ * Parent test for tests using local server in default state.
+ * @author lzoubek
+ *
+ */
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerLocation;
+import org.junit.Test;
+@Require(server=(a)Server(location=ServerLocation.Local),perspective="Java EE")
+public class AnnotatedLocalServer extends SWTTestExt{
+ /**
+ * Checks server state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ assertTrue(configuredState.getServer().isLocal);
+ }
+ /**
+ * Checks server existence
+ */
+ @Test
+ public void serverExists() {
+ ServerUtil.serverExists();
+ }
+ /**
+ * Checks if server is running
+ */
+ @Test
+ public void serverRunning() {
+ ServerUtil.serverRunning();
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,51 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.junit.Test;
-
-
-@Require(server=(a)Server(state=ServerState.NotRunning),perspective="Java EE")
-public class AnnotatedNotRunningServer extends SWTTestExt {
-
- @Test
- public void configuredState() {
- assertTrue(!configuredState.getServer().isRunning);
- assertTrue(configuredState.getServer().isConfigured);
- assertNotNull(configuredState.getServer().version);
- assertNotNull(configuredState.getServer().type);
- assertNotNull(configuredState.getServer().name);
- assertNotNull(configuredState.getServer().withJavaVersion);
- }
-
- @Test
- public void serverExists() {
- ServerUtil.serverExists();
- }
-
- @Test
- public void serverNotRunning() {
- SWTBotTreeItem server =null;
- SWTBotTree tree = servers.show().bot().tree();
- for (SWTBotTreeItem item : tree.getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- server = item;
- break;
- }
- }
- if (server!=null) {
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
- assertFalse(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
IDELabel.Menu.STOP, false)).isEnabled());
- assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
IDELabel.Menu.START, false)).isEnabled());
- }
- }
-
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,70 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+/**
+ * Parent test for tests using ot running server.
+ * @author lzoubek
+ *
+ */
+@Require(server=(a)Server(state=ServerState.NotRunning),perspective="Java EE")
+public class AnnotatedNotRunningServer extends SWTTestExt {
+ /**
+ * Checks server state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(!configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+ /**
+ * Checks server existence
+ */
+ @Test
+ public void serverExists() {
+ ServerUtil.serverExists();
+ }
+ /**
+ * Checks if server is not running
+ */
+ @Test
+ public void serverNotRunning() {
+ SWTBotTreeItem server =null;
+ SWTBotTree tree = servers.show().bot().tree();
+ for (SWTBotTreeItem item : tree.getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ server = item;
+ break;
+ }
+ }
+ if (server!=null) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
+ assertFalse(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
IDELabel.Menu.STOP, false)).isEnabled());
+ assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
IDELabel.Menu.START, false)).isEnabled());
+ }
+ }
+
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,25 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerLocation;
-import org.junit.Test;
-@Require(server=(a)Server(location=ServerLocation.Remote),perspective="Java EE")
-public class AnnotatedRemoteServer extends SWTTestExt{
- @Test
- public void configuredState() {
- assertTrue(configuredState.getServer().isRunning);
- assertTrue(configuredState.getServer().isConfigured);
- assertNotNull(configuredState.getServer().version);
- assertNotNull(configuredState.getServer().type);
- assertNotNull(configuredState.getServer().name);
- assertNotNull(configuredState.getServer().withJavaVersion);
- assertFalse(configuredState.getServer().isLocal);
- }
-
- @Test
- public void serverExists() {
- ServerUtil.serverExists();
- }
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,45 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerLocation;
+import org.junit.Test;
+/**
+ * Parent test for tests using remote server in default state.
+ * @author lzoubek
+ *
+ */
+@Require(server=(a)Server(location=ServerLocation.Remote),perspective="Java EE")
+public class AnnotatedRemoteServer extends SWTTestExt{
+ /**
+ * Checks server state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ assertFalse(configuredState.getServer().isLocal);
+ }
+ /**
+ * Checks server existence
+ */
+ @Test
+ public void serverExists() {
+ ServerUtil.serverExists();
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,44 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ESB;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.junit.Test;
-
-@Require(esb=@ESB(),perspective="Java EE")
-public class AnnotatedWithESB extends SWTTestExt {
-
- @Test
- public void configuredState() {
- assertTrue(configuredState.getEsb().isConfiured);
- assertNotNull(configuredState.getEsb().version);
- assertNotNull(configuredState.getEsb().name);
-
- }
-
- @Test
- public void runtimeExists() {
- boolean found=false;
- SWTBot bot =
open.preferenceOpen(ActionItem.Preference.JBossToolsJBossESBRuntimes.LABEL);
- SWTBotTable tbRuntimeEnvironments = bot.table();
- // first check if Environment doesn't exist
- int numRows = tbRuntimeEnvironments.rowCount();
- if (numRows > 0) {
- int currentRow = 0;
- while (currentRow < numRows) {
- if (tbRuntimeEnvironments.cell(currentRow, 1).equalsIgnoreCase(
- configuredState.getEsb().name)) {
- found = true;
- break;
- } else {
- currentRow++;
- }
- }
- }
- assertTrue(found);
- }
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,61 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ESB;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.junit.Test;
+/**
+ * Parent test for tests with ESB requirement
+ * @author lzoubek
+ *
+ */
+@Require(esb=@ESB(),perspective="Java EE")
+public class AnnotatedWithESB extends SWTTestExt {
+ /**
+ * Checks ESB configuration state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getEsb().isConfiured);
+ assertNotNull(configuredState.getEsb().version);
+ assertNotNull(configuredState.getEsb().name);
+ }
+ /**
+ * Checks ESB runtime existence
+ */
+ @Test
+ public void runtimeExists() {
+ boolean found=false;
+ SWTBot bot =
open.preferenceOpen(ActionItem.Preference.JBossToolsJBossESBRuntimes.LABEL);
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ // first check if Environment doesn't exist
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0) {
+ int currentRow = 0;
+ while (currentRow < numRows) {
+ if (tbRuntimeEnvironments.cell(currentRow, 1).equalsIgnoreCase(
+ configuredState.getEsb().name)) {
+ found = true;
+ break;
+ } else {
+ currentRow++;
+ }
+ }
+ }
+ assertTrue(found);
+ }
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,42 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.*;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.junit.Test;
-
-@Require(seam=@Seam(),perspective="Java EE")
-public class AnnotatedWithSeam extends SWTTestExt {
-
- @Test
- public void configuredState() {
- assertTrue(configuredState.getSeam().isConfiured);
- assertNotNull(configuredState.getSeam().version);
- assertNotNull(configuredState.getSeam().name);
-
- }
-
- @Test
- public void runtimeExists() {
- boolean found=false;
- SWTBot bot = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL);
- SWTBotTable tbRuntimeEnvironments = bot.table();
- // first check if Environment doesn't exist
- int numRows = tbRuntimeEnvironments.rowCount();
- if (numRows > 0) {
- int currentRow = 0;
- while (currentRow < numRows) {
- if (tbRuntimeEnvironments.cell(currentRow, 1).equalsIgnoreCase(
- configuredState.getSeam().name)) {
- found = true;
- break;
- } else {
- currentRow++;
- }
- }
- }
- assertTrue(found);
- }
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,60 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+/**
+ * Parent test for tests with seam requirement
+ * @author lzoubek
+ *
+ */
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.*;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.junit.Test;
+
+@Require(seam=@Seam(),perspective="Java EE")
+public class AnnotatedWithSeam extends SWTTestExt {
+ /**
+ * Checks seam configuration state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getSeam().isConfiured);
+ assertNotNull(configuredState.getSeam().version);
+ assertNotNull(configuredState.getSeam().name);
+
+ }
+ /**
+ * Checks seam runtime existence
+ */
+ @Test
+ public void runtimeExists() {
+ boolean found=false;
+ SWTBot bot = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL);
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ // first check if Environment doesn't exist
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0) {
+ int currentRow = 0;
+ while (currentRow < numRows) {
+ if (tbRuntimeEnvironments.cell(currentRow, 1).equalsIgnoreCase(
+ configuredState.getSeam().name)) {
+ found = true;
+ break;
+ } else {
+ currentRow++;
+ }
+ }
+ }
+ assertTrue(found);
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,33 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.junit.Test;
-
-
-@Require(server=(a)Server(state=ServerState.Running),perspective="Java EE")
-public class AnonatedRunningServer extends SWTTestExt {
-
- @Test
- public void configuredState() {
- assertTrue(configuredState.getServer().isRunning);
- assertTrue(configuredState.getServer().isConfigured);
- assertNotNull(configuredState.getServer().version);
- assertNotNull(configuredState.getServer().type);
- assertNotNull(configuredState.getServer().name);
- assertNotNull(configuredState.getServer().withJavaVersion);
- }
-
- @Test
- public void serverExists() {
- ServerUtil.serverExists();
- }
-
- @Test
- public void serverRunning() {
- ServerUtil.serverRunning();
- }
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,52 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.junit.Test;
+/**
+ * Parent test for tests using server running in default state.
+ * @author lzoubek
+ *
+ */
+@Require(server=(a)Server(state=ServerState.Running),perspective="Java EE")
+public class AnonatedRunningServer extends SWTTestExt {
+ /**
+ * Checks server state
+ */
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+ /**
+ * Checks server existence
+ */
+ @Test
+ public void serverExists() {
+ ServerUtil.serverExists();
+ }
+ /**
+ * Checks if server is running
+ */
+ @Test
+ public void serverRunning() {
+ ServerUtil.serverRunning();
+ }
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,8 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-
-@Require()
-public class ClassWithoutTests {
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,23 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+/**
+ * Test to see what happens when no class annotated with @Require
+ * annotation is run
+ * @author lzoubek
+ *
+ */
+@Require()
+public class ClassWithoutTests {
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,38 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import static org.junit.Assert.*;
-
-import org.jboss.tools.ui.bot.ext.config.RemoteSystemBean;
-import org.jboss.tools.ui.bot.ext.config.ServerBean;
-import org.junit.Test;
-
-public class ConfigBeanTest {
-
- @Test
- public void serverBeanRemote() throws Exception{
- ServerBean bean =
ServerBean.fromString("EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as,jawa23.mw.lab.eng.brq.redhat.com,/opt/jboss-as");
- assertEquals(bean.type,"EAP");
- assertEquals(bean.version,"5.0");
- assertEquals(bean.withJavaVersion,"1.6");
- assertEquals(bean.runtimeHome,"/data/jboss/jboss-eap-5.0/jboss-as");
- assertEquals(bean.remoteSystem,"jawa23.mw.lab.eng.brq.redhat.com");
- assertEquals(bean.remoteHome, "/opt/jboss-as");
- }
- @Test
- public void serverBeanLocal() throws Exception{
- ServerBean bean =
ServerBean.fromString("EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as");
- assertEquals(bean.type,"EAP");
- assertEquals(bean.version,"5.0");
- assertEquals(bean.withJavaVersion,"1.6");
- assertEquals(bean.runtimeHome,"/data/jboss/jboss-eap-5.0/jboss-as");
- assertNull(bean.remoteSystem);
- assertNull(bean.remoteHome);
- }
- @Test
- public void remoteSystem() throws Exception {
- RemoteSystemBean bean =
RemoteSystemBean.fromString("lzoubek,jawa23.mw.lab.eng.brq.redhat.com,/home/lzoubek/.ssh/id_rsa");
- assertEquals(bean.user,"lzoubek");
- assertEquals(bean.host,"jawa23.mw.lab.eng.brq.redhat.com");
- assertEquals(bean.key,"/home/lzoubek/.ssh/id_rsa");
- }
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import static org.junit.Assert.*;
+
+import org.jboss.tools.ui.bot.ext.config.RemoteSystemBean;
+import org.jboss.tools.ui.bot.ext.config.ServerBean;
+import org.junit.Test;
+/**
+ * Tests if Server Bean requirement configuration string is properly parsed
+ * and Server Bean fields are appropriately set.
+ * @author lzoubek
+ *
+ */
+public class ConfigBeanTest {
+ /**
+ * Checks Remote Server Configuration
+ *
+ * @throws Exception
+ */
+ @Test
+ public void serverBeanRemote() throws Exception{
+ ServerBean bean =
ServerBean.fromString("EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as,jawa23.mw.lab.eng.brq.redhat.com,/opt/jboss-as");
+ assertEquals(bean.type,"EAP");
+ assertEquals(bean.version,"5.0");
+ assertEquals(bean.withJavaVersion,"1.6");
+ assertEquals(bean.runtimeHome,"/data/jboss/jboss-eap-5.0/jboss-as");
+ assertEquals(bean.remoteSystem,"jawa23.mw.lab.eng.brq.redhat.com");
+ assertEquals(bean.remoteHome, "/opt/jboss-as");
+ }
+ /**
+ * Checks Local Server Configuration
+ *
+ * @throws Exception
+ */
+ @Test
+ public void serverBeanLocal() throws Exception{
+ ServerBean bean =
ServerBean.fromString("EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as");
+ assertEquals(bean.type,"EAP");
+ assertEquals(bean.version,"5.0");
+ assertEquals(bean.withJavaVersion,"1.6");
+ assertEquals(bean.runtimeHome,"/data/jboss/jboss-eap-5.0/jboss-as");
+ assertNull(bean.remoteSystem);
+ assertNull(bean.remoteHome);
+ }
+ /**
+ * Checks Remote System Configuration
+ *
+ * @throws Exception
+ */
+
+ @Test
+ public void remoteSystem() throws Exception {
+ RemoteSystemBean bean =
RemoteSystemBean.fromString("lzoubek,jawa23.mw.lab.eng.brq.redhat.com,/home/lzoubek/.ssh/id_rsa");
+ assertEquals(bean.user,"lzoubek");
+ assertEquals(bean.host,"jawa23.mw.lab.eng.brq.redhat.com");
+ assertEquals(bean.key,"/home/lzoubek/.ssh/id_rsa");
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,11 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.junit.Test;
-
-public class NotAnnotated {
-
- @Test
- public void testMustRun() {
-
- }
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,26 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.junit.Test;
+/**
+ * Test to see what happens when no annotation @Require is added to
+ * test class and class is run with RequirementAwareSuite
+ * @author lzoubek
+ *
+ */
+public class NotAnnotated {
+
+ @Test
+ public void testMustRun() {
+
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,39 +0,0 @@
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import static org.junit.Assert.*;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-
-public class ServerUtil {
-
- public static void serverExists() {
- boolean found=false;
- for (SWTBotTreeItem item : SWTTestExt.servers.show().bot().tree().getAllItems()) {
- if (item.getText().startsWith(SWTTestExt.configuredState.getServer().name)) {
- found = true;
- break;
- }
- }
- assertTrue(found);
- }
-
- public static void serverRunning() {
- SWTBotTreeItem server =null;
- SWTBotTree tree = SWTTestExt.servers.show().bot().tree();
- for (SWTBotTreeItem item : tree.getAllItems()) {
- if (item.getText().startsWith(SWTTestExt.configuredState.getServer().name)) {
- server = item;
- break;
- }
- }
- if (server!=null) {
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
- assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
IDELabel.Menu.STOP, false)).isEnabled());
- }
- }
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,57 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+/**
+ * Utils fpr checking server
+ * @author lzoubek
+ *
+ */
+import static org.junit.Assert.*;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+public class ServerUtil {
+ /**
+ * Checks if server exists
+ */
+ public static void serverExists() {
+ boolean found=false;
+ for (SWTBotTreeItem item : SWTTestExt.servers.show().bot().tree().getAllItems()) {
+ if (item.getText().startsWith(SWTTestExt.configuredState.getServer().name)) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+ /**
+ * Checks if server is running
+ */
+ public static void serverRunning() {
+ SWTBotTreeItem server =null;
+ SWTBotTree tree = SWTTestExt.servers.show().bot().tree();
+ for (SWTBotTreeItem item : tree.getAllItems()) {
+ if (item.getText().startsWith(SWTTestExt.configuredState.getServer().name)) {
+ server = item;
+ break;
+ }
+ }
+ if (server!=null) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
+ assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
IDELabel.Menu.STOP, false)).isEnabled());
+ }
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java 2012-04-24
11:29:07 UTC (rev 40449)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.ui.bot.ext.test.config;
-
-import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-@SuiteClasses( {
- ConfigBeanTest.class,
- NotAnnotated.class,
- //ClassWithoutTests.class,
- AnnotatedDefaultServer.class,
- AnnotatedEPPServer.class,
- AnnotatedJbossASServer.class,
- AnnotatedNotRunningServer.class,
- AnnotatedDefaultServer.class,
- AnnotatedWithESB.class,
- AnnotatedDisabledServer.class,
- AnonatedRunningServer.class,
- AnnotatedWithSeam.class,
- AnnotatedRemoteServer.class,
- AnnotatedLocalServer.class
-})
-(a)RunWith(RequirementAwareSuite.class)
-public class Suite {
-
-}
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java 2012-04-24
12:10:13 UTC (rev 40450)
@@ -0,0 +1,46 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+/**
+ * Test suite to test SWT Bot Extension configurations. Some tests are commented out
+ * to not run test during automated build.
+ * Test which are commented out should be run just manually when changing related
configurations
+ * @author lzoubek
+ *
+ */
+@SuiteClasses( {
+ /*
+ ConfigBeanTest.class,
+ */
+ NotAnnotated.class,
+ /*
+ ClassWithoutTests.class,
+ AnnotatedDefaultServer.class,
+ AnnotatedEPPServer.class,
+ AnnotatedJbossASServer.class,
+ AnnotatedNotRunningServer.class,
+ AnnotatedDefaultServer.class,
+ AnnotatedWithESB.class,
+ AnnotatedDisabledServer.class,
+ AnonatedRunningServer.class,
+ AnnotatedWithSeam.class,
+ AnnotatedRemoteServer.class,
+ AnnotatedLocalServer.class
+ */
+})
+(a)RunWith(RequirementAwareSuite.class)
+public class Suite {
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain