JBoss Tools SVN: r38084 - trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: sbunciak
Date: 2012-01-24 08:31:13 -0500 (Tue, 24 Jan 2012)
New Revision: 38084
Added:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTests.launch
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTestsMaven.launch
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml
Log:
Maven pom
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTests.launch
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTests.launch (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTests.launch 2012-01-24 13:31:13 UTC (rev 38084)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.openshift.ui.bot.test.OpenShiftAllBotTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.openshift.ui.bot.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Dswtbot.test.properties.file=${env_var:HOME}/swtbot.properties -Dusage_reporting_enabled=false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTestsMaven.launch
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTestsMaven.launch (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTestsMaven.launch 2012-01-24 13:31:13 UTC (rev 38084)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
+<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
+<stringAttribute key="M2_GOALS" value="clean install"/>
+<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
+<booleanAttribute key="M2_OFFLINE" value="false"/>
+<stringAttribute key="M2_PROFILES" value=""/>
+<listAttribute key="M2_PROPERTIES"/>
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
+<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
+<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/org.jboss.tools.openshift.ui.bot.test}"/>
+</launchConfiguration>
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml 2012-01-24 13:31:13 UTC (rev 38084)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools.openshift</groupId>
+ <artifactId>tests</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.openshift.tests</groupId>
+ <artifactId>org.jboss.tools.openshift.ui.bot.test</artifactId>
+
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <systemProperties>-Dtest.configurations.dir=${configurations.dir}</systemProperties>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <skip>${swtbot.test.skip}</skip>
+ <useUIThread>false</useUIThread>
+ <testSuite>org.jboss.tools.openshift.ui.bot.test</testSuite>
+ <testClass>org.jboss.tools.openshift.ui.bot.test.OpenShiftAllBotTests</testClass>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
12 years, 11 months
JBoss Tools SVN: r38083 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-01-24 07:49:58 -0500 (Tue, 24 Jan 2012)
New Revision: 38083
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/PortletBridgeBean.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
Log:
Added portlet bridge to the available configuration options
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/PortletBridgeBean.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/PortletBridgeBean.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/PortletBridgeBean.java 2012-01-24 12:49:58 UTC (rev 38083)
@@ -0,0 +1,32 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+
+/**
+ * Configuration of portlet bridge.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class PortletBridgeBean {
+
+ private String location;
+
+ public static PortletBridgeBean fromString(String propValue) throws Exception {
+ if (propValue==null) {
+ return null;
+ }
+
+ PortletBridgeBean bean = new PortletBridgeBean();
+ bean.location = propValue;
+ return bean;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ @Override
+ public String toString() {
+ return "Portlet Bridge runtime: " + location;
+ }
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java 2012-01-24 10:47:26 UTC (rev 38082)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java 2012-01-24 12:49:58 UTC (rev 38083)
@@ -42,6 +42,7 @@
private DBBean db;
private RemoteSystemBean remoteSystem;
private SecureStorage secureStorage;
+ private PortletBridgeBean portletBridge;
public TestConfiguration(String propName, String propFile) throws Exception {
this.propName = propName;
@@ -79,6 +80,8 @@
printConfig(Keys.DB, db);
secureStorage = SecureStorage.fromString(Keys.SS, getProperty(Keys.SS));
printConfig("Secure Storage", secureStorage);
+ portletBridge = PortletBridgeBean.fromString(getProperty(Keys.PORTLET_BRIDGE));
+ printConfig(Keys.PORTLET_BRIDGE, portletBridge);
}
/**
* initializes this configuration - runtimes, downloaded, homes checked
@@ -236,6 +239,10 @@
public DBBean getDB() {
return db;
}
+
+ public PortletBridgeBean getPortletBridge() {
+ return portletBridge;
+ }
public RemoteSystemBean getRemoteSystem() {
return remoteSystem;
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2012-01-24 10:47:26 UTC (rev 38082)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2012-01-24 12:49:58 UTC (rev 38083)
@@ -49,6 +49,7 @@
public static final String DB = "DB";
public static final String RS = "RS";
public static final String SS = "SS";
+ public static final String PORTLET_BRIDGE = "PORTLET_BRIDGE";
}
/**
* constant property values which are handled in configuration files
12 years, 11 months
JBoss Tools SVN: r38082 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test: src/org/jboss/tools/cdi/bot/test and 16 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-24 05:47:26 -0500 (Tue, 24 Jan 2012)
New Revision: 38082
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/BeansXMLValidationErrors.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/CDIAnnotationsType.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeansXMLQuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/EligibleInjectionQuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/requirements.properties
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/ValidationType.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/decorator/DecoratorCreatingTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedComponentsSearchingTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedRefactoringTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/injection/ProblemEligibleInjectionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeanValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeansXMLValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/DecoratorValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/IBindingValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/InterceptorValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/QualifierValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/ScopeValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/StereotypeValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeansXmlValidationProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/LibraryHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/QuickFixHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/SWTEclipseCDIExtUtil.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/DynamicWebProjectWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/QuickFixDialogWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/SearchNamedDialogWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
Log:
Huge refactoring and moving some tests
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/requirements.properties
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/requirements.properties 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/requirements.properties 2012-01-24 10:47:26 UTC (rev 38082)
@@ -1,2 +1,2 @@
-#requirements=jbossas-6.0.0.Final
-requirements=jbossas
+requirements=jbossas-6.0.0.Final
+#requirements=jbossas
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -30,6 +30,7 @@
import org.jboss.tools.cdi.bot.test.seam3.Seam3GenericOpenOnTest;
import org.jboss.tools.cdi.bot.test.seam3.Seam3ResourceOpenOnTest;
import org.jboss.tools.cdi.bot.test.wizard.CDISupportTest;
+import org.jboss.tools.cdi.bot.test.wizard.CDIWebProjectWizardTest;
import org.jboss.tools.cdi.bot.test.wizard.ConfigurationPresetTest;
import org.jboss.tools.cdi.bot.test.wizard.FacetTest;
import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
@@ -64,6 +65,7 @@
ConfigurationPresetTest.class,
FacetTest.class,
CDISupportTest.class,
+ CDIWebProjectWizardTest.class,
WizardTest.class,
BeansEditorTest.class,
NamedRefactoringTest.class,
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -12,7 +12,7 @@
package org.jboss.tools.cdi.bot.test;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
-import org.jboss.tools.cdi.bot.test.uiutils.BeansXMLValidationHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.BeansXMLHelper;
import org.jboss.tools.cdi.bot.test.uiutils.CDIProjectHelper;
import org.jboss.tools.cdi.bot.test.uiutils.CDIWizardHelper;
import org.jboss.tools.cdi.bot.test.uiutils.EditorResourceHelper;
@@ -23,10 +23,10 @@
import org.jboss.tools.ui.bot.ext.SWTTestExt;
public class CDIBase extends SWTTestExt {
-
+
private static SWTBotEclipseEditor ed;
protected static CDIProjectHelper projectHelper = new CDIProjectHelper();
- protected static BeansXMLValidationHelper beansHelper = new BeansXMLValidationHelper();
+ protected static BeansXMLHelper beansHelper = new BeansXMLHelper();
protected static CDIWizardHelper wizard = new CDIWizardHelper();
protected static CDIWizardBaseExt wizardExt = new CDIWizardBaseExt();
protected static OpenOnHelper openOnUtil = new OpenOnHelper();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -11,8 +11,6 @@
package org.jboss.tools.cdi.bot.test;
-import java.util.Arrays;
-import java.util.List;
import java.util.logging.Logger;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
@@ -31,23 +29,15 @@
@SuiteClasses({ CDIAllBotTests.class })
public class CDITestBase extends CDIBase {
- protected static final String BEANS_XML = "beans.xml";
- protected static final String CLASS_END_TAG = "</class>";
- protected static final String CLASS_OPEN_TAG = "<class>";
- protected static final String STEREOTYPE_END_TAG = "</stereotype>";
- protected static final String STEREOTYPE_OPEN_TAG = "<stereotype>";
- protected static final List<String> BEANS_XML_TAGS = Arrays.asList(
- "alternatives", "decorators", "interceptors");
-
private String projectName = "CDIProject";
private String packageName = "cdi";
- protected final String LINE_SEPARATOR = System.getProperty("line.separator");
+
protected static final Logger LOGGER = Logger.getLogger(CDITestBase.class.getName());
@Before
public void prepareWorkspace() {
if (!projectHelper.projectExists(getProjectName())) {
- projectHelper.createCDIProjectWithCDIWizard(getProjectName());
+ projectHelper.createCDIProjectWithDynamicWizard(getProjectName());
}
}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/BeansXMLValidationErrors.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/BeansXMLValidationErrors.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/BeansXMLValidationErrors.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.cdi.bot.test.annotations;
-
-public enum BeansXMLValidationErrors {
-
- ALTERNATIVE("must specify the name of an alternative bean class"),
- DECORATOR("must specify the name of a decorator bean class"),
- INTERCEPTOR("must specify the name of an interceptor class"),
- NO_SUCH_CLASS("There is no class with the specified name");
-
- private String validationError;
-
- private BeansXMLValidationErrors(String validationError) {
- this.validationError = validationError;
- }
-
- public String message() {
- return validationError;
- }
-
-}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/CDIAnnotationsType.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/CDIAnnotationsType.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/CDIAnnotationsType.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.cdi.bot.test.annotations;
-
-public enum CDIAnnotationsType {
-
- SERIALIZABLE, TARGET, RETENTION, NAMED, TYPED, DISPOSES, OBSERVES, INTERCEPTOR,
- SPECIALIZES, DECORATOR, PRODUCES, NONBINDING, STATELESS, INJECT,
- MULTIPLE_BEAN_ELIGIBLE, NO_BEAN_ELIGIBLE;
-
-}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/ValidationType.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/ValidationType.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/ValidationType.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -14,6 +14,7 @@
SERIALIZABLE, MULTIPLE_BEAN_ELIGIBLE, NO_BEAN_ELIGIBLE, DISPOSES, OBSERVES,
PRODUCES, TARGET, RETENTION, TYPED, NAMED, NONBINDING, SPECIALIZES, STATELESS,
- NO_CLASS, NO_ANNOTATION, ALTERNATIVE_BEAN_XML, ALTERNATIVE_STEREOTYPE_BEAN_XML
+ NO_CLASS, NO_ANNOTATION, ALTERNATIVE_BEAN_XML, ALTERNATIVE_STEREOTYPE_BEAN_XML,
+ SPECIFY_ALTERNATIVE, SPECIFY_DECORATOR, SPECIFY_INTERCEPTOR,
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -14,6 +14,7 @@
import java.util.Arrays;
import java.util.List;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.CDITestBase;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
@@ -41,6 +42,9 @@
"A1", "A2", "A3");
private static final List<String> STEREOTYPES_NAMES = Arrays.asList(
"S1", "S2", "S3");
+
+ private static final List<String> BEANS_XML_TAGS = Arrays.asList(
+ "alternatives", "decorators", "interceptors");
@Override
public String getProjectName() {
@@ -49,10 +53,11 @@
@Test
public void testPossibleCompletionInBeansXML() {
- beansHelper.createClearBeansXML(getProjectName());
+
+ beansHelper.createBeansXMLWithEmptyTag(getProjectName());
LOGGER.info("Clear beans.xml was created");
- checkAutoCompletion(3, 0, "<>", BEANS_XML, BEANS_XML_TAGS);
+ checkAutoCompletion(3, 0, "<>", CDIConstants.BEANS_XML, BEANS_XML_TAGS);
}
@Test
@@ -64,7 +69,7 @@
beansHelper.createBeansXMLWithInterceptor(getProjectName(), getPackageName(), null);
LOGGER.info("Beans.xml with interceptors tag was created");
- List<String> proposalList = getProposalList(BEANS_XML, CLASS_END_TAG, 0, 0);
+ List<String> proposalList = getProposalList(CDIConstants.BEANS_XML, CDIConstants.CLASS_END_TAG, 0, 0);
for (String interceptor : INTERCEPTOR_NAMES) {
assertTrue(proposalList.contains(interceptor + " - " + getPackageName()));
}
@@ -79,7 +84,8 @@
beansHelper.createBeansXMLWithDecorator(getProjectName(), getPackageName(), null);
LOGGER.info("Beans.xml with decorators tag was created");
- List<String> proposalList = getProposalList(BEANS_XML, CLASS_END_TAG, 0, 0);
+ List<String> proposalList = getProposalList(CDIConstants.BEANS_XML,
+ CDIConstants.CLASS_END_TAG, 0, 0);
for (String decorator : DECORATORS_NAMES) {
assertTrue(proposalList.contains(decorator + " - " + getPackageName()));
}
@@ -95,7 +101,8 @@
beansHelper.createBeansXMLWithStereotype(getProjectName(), getPackageName(), null);
LOGGER.info("Beans.xml with stereotype tag was created");
- List<String> proposalList = getProposalList(BEANS_XML, STEREOTYPE_END_TAG, 0, 0);
+ List<String> proposalList = getProposalList(CDIConstants.BEANS_XML,
+ CDIConstants.STEREOTYPE_END_TAG, 0, 0);
for (String stereotype : STEREOTYPES_NAMES) {
assertTrue(proposalList.contains(stereotype + " - " + getPackageName()));
}
@@ -111,7 +118,8 @@
beansHelper.createBeansXMLWithAlternative(getProjectName(), getPackageName(), null);
LOGGER.info("Beans.xml with alternative tag was created");
- List<String> proposalList = getProposalList(BEANS_XML, CLASS_END_TAG, 0, 0);
+ List<String> proposalList = getProposalList(CDIConstants.BEANS_XML,
+ CDIConstants.CLASS_END_TAG, 0, 0);
for (String alternative : ALTERNATIVES_NAMES) {
assertTrue(proposalList.contains(alternative + " - " + getPackageName()));
}
@@ -134,10 +142,10 @@
wizard.createCDIComponent(CDIWizardType.SCOPE, components[4],
getPackageName(), null);
- beansHelper.createClearBeansXMLWithEmptyTag(getProjectName());
+ beansHelper.createBeansXMLWithEmptyTag(getProjectName());
LOGGER.info("Clear beans.xml with empty tag was created");
- List<String> proposalList = getProposalList(BEANS_XML, "<>", 1, 0);
+ List<String> proposalList = getProposalList(CDIConstants.BEANS_XML, "<>", 1, 0);
List<String> nonSupportedComponents = Arrays.asList(components);
for (String nonSupportedComponent : nonSupportedComponents) {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -11,9 +11,10 @@
package org.jboss.tools.cdi.bot.test.beansxml;
-import org.jboss.tools.cdi.bot.test.CDITestBase;
-import org.jboss.tools.cdi.bot.test.annotations.BeansXMLValidationErrors;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
+import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
+import org.jboss.tools.cdi.bot.test.quickfix.base.BeansXMLQuickFixTestBase;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -24,7 +25,7 @@
*
*/
-public class BeansXMLValidationTest extends CDITestBase {
+public class BeansXMLValidationTest extends BeansXMLQuickFixTestBase {
private final String someBean = "Bean1";
private final String nonExistingPackage = "somePackage";
@@ -40,12 +41,11 @@
}
@Test
- public void testClearBeansXMLValidation() {
+ public void testEmptyBeansXMLValidation() {
- beansHelper.createClearBeansXML(getProjectName());
+ beansHelper.createEmptyBeansXML(getProjectName());
- assertTrue(beansHelper.getBeansXMLValidationErrors(
- getProjectName()).length == 0);
+ assertTrue(isBeanXMLValidationErrorEmpty());
}
@@ -55,27 +55,24 @@
String className = "I1";
if (!projectExplorer.isFilePresent(getProjectName(),
- ("Java Resources/src/" + getPackageName() +
+ (CDIConstants.JAVA_RESOURCES_SRC_FOLDER + getPackageName() +
"/" + someBean + ".java").split("/"))) {
wizard.createCDIComponent(CDIWizardType.BEAN, someBean, getPackageName(), null);
}
wizard.createCDIComponent(CDIWizardType.INTERCEPTOR, className, getPackageName(), null);
- assertTrue(beansHelper.checkInterceptorInBeansXML(getProjectName(),
- getPackageName(), className));
+ beansHelper.createBeansXMLWithInterceptor(getProjectName(), getPackageName(), className);
+ assertTrue(isBeanXMLValidationErrorEmpty());
+ beansHelper.createBeansXMLWithInterceptor(getProjectName(), nonExistingPackage, className);
+ assertFalse(isBeanXMLValidationErrorEmpty());
+ assertNotNull(getProblem(ValidationType.NO_CLASS));
- assertFalse(beansHelper.checkInterceptorInBeansXML(getProjectName(),
- nonExistingPackage, className));
- assertTrue(beansHelper.checkValidationErrorInBeansXML(getProjectName(),
- BeansXMLValidationErrors.NO_SUCH_CLASS));
+ beansHelper.createBeansXMLWithInterceptor(getProjectName(), getPackageName(), someBean);
+ assertFalse(isBeanXMLValidationErrorEmpty());
+ assertNotNull(getProblem(ValidationType.SPECIFY_INTERCEPTOR));
-
- assertFalse(beansHelper.checkInterceptorInBeansXML(getProjectName(),
- getPackageName(), someBean));
- assertTrue(beansHelper.checkValidationErrorInBeansXML(getProjectName(),
- BeansXMLValidationErrors.INTERCEPTOR));
}
@Test
@@ -84,28 +81,23 @@
String className = "D1";
if (!projectExplorer.isFilePresent(getProjectName(),
- ("Java Resources/src/" + getPackageName() +
+ (CDIConstants.JAVA_RESOURCES_SRC_FOLDER + getPackageName() +
"/" + someBean + ".java").split("/"))) {
wizard.createCDIComponent(CDIWizardType.BEAN, someBean, getPackageName(), null);
}
- wizard.createCDIComponent(CDIWizardType.DECORATOR, className,
- getPackageName(), "java.util.Set");
+ wizard.createCDIComponent(CDIWizardType.DECORATOR, className, getPackageName(), "java.util.Set");
- assertTrue(beansHelper.checkDecoratorInBeansXML(getProjectName(),
- getPackageName(), className));
+ beansHelper.createBeansXMLWithDecorator(getProjectName(), getPackageName(), className);
+ assertTrue(isBeanXMLValidationErrorEmpty());
+ beansHelper.createBeansXMLWithDecorator(getProjectName(), nonExistingPackage, className);
+ assertFalse(isBeanXMLValidationErrorEmpty());
+ assertNotNull(getProblem(ValidationType.NO_CLASS));
- assertFalse(beansHelper.checkDecoratorInBeansXML(getProjectName(),
- nonExistingPackage, className));
- assertTrue(beansHelper.checkValidationErrorInBeansXML(getProjectName(),
- BeansXMLValidationErrors.NO_SUCH_CLASS));
-
-
- assertFalse(beansHelper.checkDecoratorInBeansXML(getProjectName(),
- getPackageName(), someBean));
- assertTrue(beansHelper.checkValidationErrorInBeansXML(getProjectName(),
- BeansXMLValidationErrors.DECORATOR));
+ beansHelper.createBeansXMLWithDecorator(getProjectName(), getPackageName(), someBean);
+ assertFalse(isBeanXMLValidationErrorEmpty());
+ assertNotNull(getProblem(ValidationType.SPECIFY_DECORATOR));
}
@Test
@@ -114,29 +106,24 @@
String className = "A1";
if (!projectExplorer.isFilePresent(getProjectName(),
- ("Java Resources/src/" + getPackageName() +
+ (CDIConstants.JAVA_RESOURCES_SRC_FOLDER + getPackageName() +
"/" + someBean + ".java").split("/"))) {
wizard.createCDIComponent(CDIWizardType.BEAN, someBean, getPackageName(), null);
}
- wizard.createCDIComponent(CDIWizardType.BEAN, className,
- getPackageName(), "alternative");
+ wizard.createCDIComponent(CDIWizardType.BEAN, className, getPackageName(), "alternative");
- assertTrue(beansHelper.checkAlternativeInBeansXML(getProjectName(),
- getPackageName(), className));
+ beansHelper.createBeansXMLWithAlternative(getProjectName(), getPackageName(), className);
+ assertTrue(isBeanXMLValidationErrorEmpty());
+ beansHelper.createBeansXMLWithAlternative(getProjectName(), nonExistingPackage, className);
+ assertFalse(isBeanXMLValidationErrorEmpty());
+ assertNotNull(getProblem(ValidationType.NO_CLASS));
- assertFalse(beansHelper.checkAlternativeInBeansXML(getProjectName(),
- nonExistingPackage, className));
- assertTrue(beansHelper.checkValidationErrorInBeansXML(getProjectName(),
- BeansXMLValidationErrors.NO_SUCH_CLASS));
+ beansHelper.createBeansXMLWithAlternative(getProjectName(), getPackageName(), someBean);
+ assertFalse(isBeanXMLValidationErrorEmpty());
+ assertNotNull(getProblem(ValidationType.SPECIFY_ALTERNATIVE));
-
- assertFalse(beansHelper.checkAlternativeInBeansXML(getProjectName(),
- getPackageName(), someBean));
- assertTrue(beansHelper.checkValidationErrorInBeansXML(getProjectName(),
- BeansXMLValidationErrors.ALTERNATIVE));
-
}
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/decorator/DecoratorCreatingTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/decorator/DecoratorCreatingTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/decorator/DecoratorCreatingTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -10,14 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.bot.test.decorator;
-import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
import org.jboss.tools.cdi.bot.test.CDITestBase;
-import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
/**
* Test operates on creating new decorator
@@ -26,11 +19,6 @@
*
*/
-@Require(clearProjects = true, perspective = "Java EE",
- server = @Server(state = ServerState.NotRunning,
- version = "6.0", operator = ">="))
-(a)RunWith(RequirementAwareSuite.class)
-@SuiteClasses({ CDIAllBotTests.class })
public class DecoratorCreatingTest extends CDITestBase {
//https://issues.jboss.org/browse/JBIDE-3136
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -23,6 +23,7 @@
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.CDISmokeBotTests;
import org.jboss.tools.cdi.bot.test.CDITestBase;
import org.jboss.tools.cdi.bot.test.editor.BeansEditor.Item;
@@ -56,7 +57,7 @@
@SuiteClasses({ CDIAllBotTests.class, CDISmokeBotTests.class })
public class BeansEditorTest extends CDITestBase {
- private static final String descPath = "WebContent/WEB-INF/beans.xml";
+ private static final String descPath = CDIConstants.WEB_INF_BEANS_XML_PATH;
@BeforeClass
public static void setup() {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -16,6 +16,7 @@
import java.util.logging.Logger;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.CDITestBase;
import org.jboss.tools.cdi.bot.test.annotations.JSFEnvironment;
import org.jboss.tools.cdi.bot.test.annotations.JSFTemplate;
@@ -59,8 +60,8 @@
*/
protected void createXHTMLPage(String pageName) {
XHTMLDialogWizard xhtmlWizard = new NewXHTMLFileWizard().run();
- xhtmlWizard.setDestination(getProjectName() + "/WebContent/" + WEB_FOLDER).
- setName(pageName).finish();
+ xhtmlWizard.setDestination(getProjectName() + "/" + CDIConstants.WEBCONTENT +
+ "/" + WEB_FOLDER).setName(pageName).finish();
bot.sleep(Timing.time3S());
util.waitForNonIgnoredJobs();
setEd(bot.activeEditor().toTextEditor());
@@ -105,7 +106,7 @@
try {
bot.editorByTitle(className + ".java");
} catch (WidgetNotFoundException exc) {
- projectExplorer.openFile(getProjectName(), "Java Resources", "JavaSource",
+ projectExplorer.openFile(getProjectName(), CDIConstants.JAVA_RESOURCES, CDIConstants.JAVA_SOURCE,
getPackageName(), className);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedComponentsSearchingTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedComponentsSearchingTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedComponentsSearchingTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -15,6 +15,7 @@
import java.util.List;
import java.util.Map;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.CDITestBase;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBaseExt;
@@ -36,6 +37,8 @@
private final String beanName = "Bean1";
private final String stereotypeName = "Stereotype1";
private static SearchNamedDialogWizard namedDialog = null;
+ private final String BEAN_STEREOTYPE_PATH = "/resources/named/BeanWithStereotype.java.cdi";
+ private final String BEAN_STEREOTYPE_NAMED_PATH = "/resources/named/BeanWithStereotypeAndNamed.java.cdi";
@Override
public String getProjectName() {
@@ -164,7 +167,7 @@
false, false, false).finish();
wizard.createCDIComponentWithContent(CDIWizardType.BEAN, beanName, getPackageName(),
- null, "/resources/named/BeanWithStereotype.java.cdi");
+ null, BEAN_STEREOTYPE_PATH);
namedDialog = openSearchNamedDialog().setNamedPrefix(beanName);
assertTrue(namedDialog.matchingItems().size() == 1);
@@ -183,7 +186,7 @@
false, false, false).finish();
wizard.createCDIComponentWithContent(CDIWizardType.BEAN, beanName, getPackageName(),
- null, "/resources/named/BeanWithStereotypeAndNamed.java.cdi");
+ null, BEAN_STEREOTYPE_NAMED_PATH);
namedDialog = openSearchNamedDialog().setNamedPrefix(beanName);
assertTrue(namedDialog.matchingItems().size() == 0);
@@ -204,7 +207,7 @@
false, false, false).finish();
wizard.createCDIComponentWithContent(CDIWizardType.BEAN, beanName, getPackageName(),
- null, "/resources/named/BeanWithStereotypeAndNamed.java.cdi");
+ null, BEAN_STEREOTYPE_NAMED_PATH);
namedDialog = openSearchNamedDialog().setNamedPrefix(beanName);
assertTrue(namedDialog.matchingItems().size() == 0);
@@ -227,7 +230,7 @@
private SearchNamedDialogWizard openSearchNamedDialog() {
- bot.menu("Navigate").menu("Open CDI Named Bean").click();
+ bot.menu(CDIConstants.NAVIGATE).menu(CDIConstants.OPEN_CDI_NAMED_BEANS).click();
bot.sleep(Timing.time500MS());
return new SearchNamedDialogWizard();
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedRefactoringTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedRefactoringTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/named/NamedRefactoringTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -29,12 +29,12 @@
public class NamedRefactoringTest extends JSFTestBase {
- private static final String MANAGED_BEAN_1 = "ManagedBean1";
- private static final String MANAGED_BEAN_2 = "ManagedBean2";
- private static final String INDEX_XHTML_1= "index1.xhtml";
- private static final String INDEX_XHTML_2= "index2.xhtml";
- private static final String INDEX_XHTML_3= "index3.xhtml";
- private static final String NEW_NAMED_PARAM = "bean2";
+ private final String MANAGED_BEAN_1 = "ManagedBean1";
+ private final String MANAGED_BEAN_2 = "ManagedBean2";
+ private final String INDEX_XHTML_1= "index1.xhtml";
+ private final String INDEX_XHTML_2= "index2.xhtml";
+ private final String INDEX_XHTML_3= "index3.xhtml";
+ private final String NEW_NAMED_PARAM = "bean2";
@Override
public String getProjectName() {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.bot.test.openon;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.CDITestBase;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
@@ -49,9 +50,9 @@
protected boolean checkBeanXMLDecoratorOpenOn(String packageName, String className) {
wizard.createCDIComponent(CDIWizardType.DECORATOR, className, packageName,
"java.util.Set");
- bot.editorByTitle("beans.xml").show();
+ bot.editorByTitle(CDIConstants.BEANS_XML).show();
bot.cTabItem("Source").activate();
- openOnUtil.openOnDirect(packageName + "." + className, "beans.xml");
+ openOnUtil.openOnDirect(packageName + "." + className, CDIConstants.BEANS_XML);
return getEd().getTitle().equals(className + ".java");
}
@@ -67,9 +68,9 @@
protected boolean checkBeanXMLInterceptorOpenOn(String packageName, String className) {
wizard.createCDIComponent(CDIWizardType.INTERCEPTOR, className, packageName,
null);
- bot.editorByTitle("beans.xml").show();
+ bot.editorByTitle(CDIConstants.BEANS_XML).show();
bot.cTabItem("Source").activate();
- openOnUtil.openOnDirect(packageName + "." + className, "beans.xml");
+ openOnUtil.openOnDirect(packageName + "." + className, CDIConstants.BEANS_XML);
return getEd().getTitle().equals(className + ".java");
}
@@ -84,9 +85,9 @@
protected boolean checkBeanXMLAlternativeOpenOn(String packageName, String className) {
wizard.createCDIComponent(CDIWizardType.BEAN, className, packageName,
"alternative+beansxml");
- bot.editorByTitle("beans.xml").show();
+ bot.editorByTitle(CDIConstants.BEANS_XML).show();
bot.cTabItem("Source").activate();
- openOnUtil.openOnDirect(packageName + "." + className, "beans.xml");
+ openOnUtil.openOnDirect(packageName + "." + className, CDIConstants.BEANS_XML);
return getEd().getTitle().equals(className + ".java");
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -12,6 +12,7 @@
package org.jboss.tools.cdi.bot.test.openon;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.ui.bot.ext.Timing;
import org.junit.Test;
@@ -38,7 +39,7 @@
String injectOption = null;
for (int i = 1; i < 12; i++) {
String injectPoint = "myBean" + i;
- injectOption = "Show All Assignable Beans...";
+ injectOption = CDIConstants.SHOW_ALL_ASSIGNABLE;
if (i > 8) injectOption = "Open @Inject Bean";
checkInjectedPoint(injectPoint, injectOption);
}
@@ -49,7 +50,7 @@
@Test
public void testBeansXMLClassesOpenOn() {
- beansHelper.createClearBeansXML(getProjectName());
+ beansHelper.createEmptyBeansXML(getProjectName());
assertTrue(checkBeanXMLDecoratorOpenOn(getProjectName(), "D1"));
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeansXMLQuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeansXMLQuickFixTestBase.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeansXMLQuickFixTestBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.cdi.bot.test.quickfix;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
-import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.validators.BeansXmlValidationProvider;
-import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
-import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBase;
-import org.jboss.tools.cdi.bot.test.uiutils.wizards.QuickFixDialogWizard;
-
-public class BeansXMLQuickFixTestBase extends QuickFixTestBase {
-
- private static IValidationProvider validationProvider = new BeansXmlValidationProvider();
-
- public IValidationProvider validationProvider() {
- return validationProvider;
- }
-
- /**
- * Method firstly gets beans.xml validation problem. Then
- * it opens quick fix wizard, selects default value and
- * press finish button
- */
- private void openBeanXMLValidationProblem(ValidationType validationProblemType) {
-
- SWTBotTreeItem validationProblem = getProblem(validationProblemType);
- assertNotNull(validationProblem);
-
- quickFixHelper.openQuickFix(validationProblem);
- QuickFixDialogWizard qfWizard = new QuickFixDialogWizard();
- qfWizard.setFix(qfWizard.getAvailableFixes().get(0));
- qfWizard.setResource(qfWizard.getResources().get(0));
- qfWizard.finish();
- }
-
- /**
- * Method checks if there is no beans.xml validation error
- * @return
- */
- public boolean isBeanXMLValidationProblemsEmpty() {
- for (ValidationType validationType: validationProvider().getAllValidationProblemsType()) {
- if (getProblem(validationType) != null) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Method resolves validation error where there is no such Alternative as
- * configured in beans.xml. It opens quick fix and through finish button
- * the Bean Wizard dialog is opened where both parameters are used to create
- * the new alternative bean
- * @param name
- * @param pkg
- */
- public void resolveAddNewAlternative(String name, String pkg) {
-
- openBeanXMLValidationProblem(ValidationType.NO_CLASS);
- CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.BEAN);
- if (cdiWizardBase.isAlternative() && cdiWizardBase.canFinish()) {
- cdiWizardBase.setName(name).setPackage(pkg).finish();
- }else {
- fail("Dialog can't be finished");
- }
-
- }
-
- /**
- * Method resolves validation error where there is no such Stereotype as
- * configured in beans.xml. It opens quick fix and through finish button
- * the Stereotype Wizard dialog is opened where both parameters are used to create
- * the new stereotype annotation
- * @param name
- * @param pkg
- */
- public void resolveAddNewStereotype(String name, String pkg) {
-
- openBeanXMLValidationProblem(ValidationType.NO_ANNOTATION);
- CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.STEREOTYPE);
- if (cdiWizardBase.isAlternative() && cdiWizardBase.canFinish()) {
- cdiWizardBase.setName(name).setPackage(pkg).finish();
- }else {
- fail("Dialog can't be finished");
- }
-
- }
-
- /**
- * Method resolves validation error where there is no such decorator as
- * configured in beans.xml. It opens quick fix and through finish button
- * the Decorator Wizard dialog is opened where both parameters are used to create
- * the new decorator. Interface "java.util.List" is automatically used.
- * @param name
- * @param pkg
- */
- public void resolveAddNewDecorator(String name, String pkg) {
-
- openBeanXMLValidationProblem(ValidationType.NO_CLASS);
- CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.DECORATOR);
- cdiWizardBase.addInterface("java.util.List");
- if (cdiWizardBase.canFinish()) {
- cdiWizardBase.setName(name).setPackage(pkg).finish();
- } else {
- fail("Dialog can't be finished");
- }
-
- }
-
- /**
- * Method resolves validation error where there is no such Interceptor as
- * configured in beans.xml. It opens quick fix and through finish button
- * the Interceptor Wizard dialog is opened where both parameters are used to create
- * the new Interceptor
- * @param name
- * @param pkg
- */
- public void resolveAddNewInterceptor(String name, String pkg) {
-
- openBeanXMLValidationProblem(ValidationType.NO_CLASS);
- CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.INTERCEPTOR);
- if (cdiWizardBase.canFinish()) {
- cdiWizardBase.setName(name).setPackage(pkg).finish();
- }else {
- fail("Dialog can't be finished");
- }
-
- }
-
- /**
- * Method corrects Bean which has no @Alternative annotation in it
- * by adding these parameter.
- * @param name
- * @param pkg
- */
- public void resolveAddAlternativeToBean(String name) {
-
- openBeanXMLValidationProblem(ValidationType.ALTERNATIVE_BEAN_XML);
- String content = bot.editorByTitle(name + ".java").toTextEditor().getText();
- assertTrue(content.contains("@Alternative"));
-
- }
-
- /**
- * Method corrects Stereotype which has no @Alternative annotation in it
- * by adding these parameter.
- * @param name
- * @param pkg
- */
- public void resolveAddAlternativeToStereotype(String name) {
-
- openBeanXMLValidationProblem(ValidationType.ALTERNATIVE_STEREOTYPE_BEAN_XML);
- String content = bot.editorByTitle(name + ".java").toTextEditor().getText();
- assertTrue(content.contains("@Alternative"));
-
- }
-
-}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/EligibleInjectionQuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/EligibleInjectionQuickFixTestBase.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/EligibleInjectionQuickFixTestBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.cdi.bot.test.quickfix;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.injection.QualifierOperation;
-import org.jboss.tools.cdi.bot.test.quickfix.validators.BeanValidationProvider;
-import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
-import org.jboss.tools.cdi.bot.test.uiutils.wizards.QuickFixDialogWizard;
-import org.jboss.tools.cdi.bot.test.uiutils.wizards.SpecifyBeanDialogWizard;
-import org.jboss.tools.ui.bot.ext.Timing;
-
-public class EligibleInjectionQuickFixTestBase extends QuickFixTestBase{
-
- private static IValidationProvider validationProvider = new BeanValidationProvider();
-
- public IValidationProvider validationProvider() {
- return validationProvider;
- }
-
- /**
- * Method resolves multiple bean injection problem. By setting class which
- * should be more qualified and qualifier name it resolves this problem.
- * If qualifier doesn't exist, by using qualifier wizard it creates the new
- * one and uses it to resolve problem
- * @param classToQualify
- * @param qualifier
- */
- public void resolveMultipleBeans(ValidationType validationType, String classToQualify,
- String qualifier, QualifierOperation operation) {
-
- SWTBotTreeItem validationProblem = getProblem(validationType);
- assertNotNull(validationProblem);
-
- quickFixHelper.openQuickFix(validationProblem);
- QuickFixDialogWizard quickFixWizard = new QuickFixDialogWizard();
- for (String availableFix : quickFixWizard.getAvailableFixes()) {
- if (availableFix.contains(classToQualify)) {
- quickFixWizard.setFix(availableFix).
- setResource(quickFixWizard.getResources().get(0)).
- finish();
- }
- }
-
- SpecifyBeanDialogWizard spBeanDialogWizard = new SpecifyBeanDialogWizard();
- if (operation == QualifierOperation.ADD) {
- boolean qualifFound = false;
- for (String availQualifer : spBeanDialogWizard.getAvailableQualifiers()) {
- if (availQualifer.equals(qualifier + " - " + getPackageName())) {
- qualifFound = true;
- spBeanDialogWizard.addQualifier(availQualifer);
- }
- }
- // there was no such qualifer, it has to be created, after creation it
- // has to be added to in Bean qualifiers
- if (!qualifFound) {
- spBeanDialogWizard.createNewQualifier(qualifier, getPackageName()).
- setName(qualifier).finish();
- bot.sleep(Timing.time2S());
- for (String availQualifer : spBeanDialogWizard.getAvailableQualifiers()) {
- if (availQualifer.equals(qualifier + " - " + getPackageName())) {
- spBeanDialogWizard.addQualifier(availQualifer);
- }
- }
- }
-
- } else {
- for (String inBeanQualifer : spBeanDialogWizard.getInBeanQualifiers()) {
- if (inBeanQualifer.equals(qualifier + " - " + getPackageName())) {
- spBeanDialogWizard.removeQualifier(inBeanQualifer);
- }
- }
- }
-
- spBeanDialogWizard.finish();
-
- bot.sleep(Timing.time1S());
- util.waitForNonIgnoredJobs();
- }
-
-}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QuickFixTestBase.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QuickFixTestBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.cdi.bot.test.quickfix;
-
-
-import java.util.List;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.cdi.bot.test.CDITestBase;
-import org.jboss.tools.cdi.bot.test.annotations.ProblemsType;
-import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
-import org.jboss.tools.cdi.bot.test.uiutils.wizards.QuickFixDialogWizard;
-import org.junit.BeforeClass;
-
-/**
- * Test base for all QuickFix-like tests
- *
- * @author Jaroslav Jankovic
- */
-
-public abstract class QuickFixTestBase extends CDITestBase {
-
- @BeforeClass
- public static void setup() {
- problems.show();
- }
-
- protected abstract IValidationProvider validationProvider();
-
- /**
- * checkQuickFix is the most important method in this class. It
- * gets validation error prior to component type and annotation type,
- * then it resolve validation error through quick fix
- * wizard and finally check if validation errors was fixed through
- * this wizard
- * @param validationType
- * @param compType
- */
- public void checkQuickFix(ValidationType validationType) {
- SWTBotTreeItem validationProblem = getProblem(validationType);
- assertNotNull(validationProblem);
- resolveQuickFix(validationProblem);
- validationProblem = getProblem(validationType);
- assertNull(validationProblem);
- }
-
- /**
- * Methods gets the particular validation problem located in Problems View by
- * using specific ValidationErrorsProvider
- * @param validationType
- * @param compType
- * @return
- */
- protected SWTBotTreeItem getProblem(ValidationType validationType) {
- IValidationProvider validationErrorsProvider = validationProvider();
- List<String> validationProblems = null;
- SWTBotTreeItem[] problemsInProblemsView = null;
- if (validationErrorsProvider.getAllWarningsAnnotation().contains(validationType)) {
- validationProblems = validationErrorsProvider.getAllWarningForAnnotationType(validationType);
- problemsInProblemsView = quickFixHelper.getProblems(ProblemsType.WARNINGS, getProjectName());
- } else {
- validationProblems = validationErrorsProvider.getAllErrorsForAnnotationType(validationType);
- problemsInProblemsView = quickFixHelper.getProblems(ProblemsType.ERRORS, getProjectName());
- }
- for (SWTBotTreeItem ti: problemsInProblemsView) {
- for (String validationProblem: validationProblems) {
- if (ti.getText().contains(validationProblem)) {
- return ti;
- }
- }
- }
- return null;
- }
-
- /**
- * Method resolves particular validation problem (parameter ti).
- * It simply open context menu for param "ti", open menu "Quick Fix" and
- * chooses first option and confirms it (resolve it)
- * @param ti
- */
- private void resolveQuickFix(SWTBotTreeItem ti) {
- quickFixHelper.openQuickFix(ti);
-
- QuickFixDialogWizard qfWizard = new QuickFixDialogWizard();
-
- String firstFix = qfWizard.getAvailableFixes().get(0);
- String firstResource = qfWizard.getResources().get(0);
-
- qfWizard.setFix(firstFix).setResource(firstResource).finish();
-
- util.waitForNonIgnoredJobs();
- }
-
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.quickfix.base;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
+import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
+import org.jboss.tools.cdi.bot.test.quickfix.validators.BeansXmlValidationProvider;
+import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBase;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.QuickFixDialogWizard;
+import org.jboss.tools.ui.bot.ext.view.ProblemsView;
+
+public class BeansXMLQuickFixTestBase extends QuickFixTestBase {
+
+ private static IValidationProvider validationProvider = new BeansXmlValidationProvider();
+
+ public IValidationProvider validationProvider() {
+ return validationProvider;
+ }
+
+ /**
+ * Method firstly gets beans.xml validation problem. Then
+ * it opens quick fix wizard, selects default value and
+ * press finish button
+ */
+ private void openBeanXMLValidationProblem(ValidationType validationProblemType) {
+
+ SWTBotTreeItem validationProblem = getProblem(validationProblemType);
+ assertNotNull(validationProblem);
+
+ quickFixHelper.openQuickFix(validationProblem);
+ QuickFixDialogWizard qfWizard = new QuickFixDialogWizard();
+ qfWizard.setFix(qfWizard.getAvailableFixes().get(0));
+ qfWizard.setResource(qfWizard.getResources().get(0));
+ qfWizard.finish();
+ }
+
+ /**
+ * Method checks if there is no beans.xml validation error
+ * @return
+ */
+ public boolean isBeanXMLValidationErrorEmpty() {
+ return ProblemsView.getFilteredErrorsTreeItems(bot, null, "/" + getProjectName(),
+ "beans.xml", "CDI Problem").length == 0;
+ }
+
+ /**
+ * Method resolves validation error where there is no such Alternative as
+ * configured in beans.xml. It opens quick fix and through finish button
+ * the Bean Wizard dialog is opened where both parameters are used to create
+ * the new alternative bean
+ * @param name
+ * @param pkg
+ */
+ public void resolveAddNewAlternative(String name, String pkg) {
+
+ openBeanXMLValidationProblem(ValidationType.NO_CLASS);
+ CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.BEAN);
+ if (cdiWizardBase.isAlternative() && cdiWizardBase.canFinish()) {
+ cdiWizardBase.setName(name).setPackage(pkg).finish();
+ }else {
+ fail("Dialog can't be finished");
+ }
+
+ }
+
+ /**
+ * Method resolves validation error where there is no such Stereotype as
+ * configured in beans.xml. It opens quick fix and through finish button
+ * the Stereotype Wizard dialog is opened where both parameters are used to create
+ * the new stereotype annotation
+ * @param name
+ * @param pkg
+ */
+ public void resolveAddNewStereotype(String name, String pkg) {
+
+ openBeanXMLValidationProblem(ValidationType.NO_ANNOTATION);
+ CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.STEREOTYPE);
+ if (cdiWizardBase.isAlternative() && cdiWizardBase.canFinish()) {
+ cdiWizardBase.setName(name).setPackage(pkg).finish();
+ }else {
+ fail("Dialog can't be finished");
+ }
+
+ }
+
+ /**
+ * Method resolves validation error where there is no such decorator as
+ * configured in beans.xml. It opens quick fix and through finish button
+ * the Decorator Wizard dialog is opened where both parameters are used to create
+ * the new decorator. Interface "java.util.List" is automatically used.
+ * @param name
+ * @param pkg
+ */
+ public void resolveAddNewDecorator(String name, String pkg) {
+
+ openBeanXMLValidationProblem(ValidationType.NO_CLASS);
+ CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.DECORATOR);
+ cdiWizardBase.addInterface("java.util.List");
+ if (cdiWizardBase.canFinish()) {
+ cdiWizardBase.setName(name).setPackage(pkg).finish();
+ } else {
+ fail("Dialog can't be finished");
+ }
+
+ }
+
+ /**
+ * Method resolves validation error where there is no such Interceptor as
+ * configured in beans.xml. It opens quick fix and through finish button
+ * the Interceptor Wizard dialog is opened where both parameters are used to create
+ * the new Interceptor
+ * @param name
+ * @param pkg
+ */
+ public void resolveAddNewInterceptor(String name, String pkg) {
+
+ openBeanXMLValidationProblem(ValidationType.NO_CLASS);
+ CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.INTERCEPTOR);
+ if (cdiWizardBase.canFinish()) {
+ cdiWizardBase.setName(name).setPackage(pkg).finish();
+ }else {
+ fail("Dialog can't be finished");
+ }
+
+ }
+
+ /**
+ * Method corrects Bean which has no @Alternative annotation in it
+ * by adding these parameter.
+ * @param name
+ * @param pkg
+ */
+ public void resolveAddAlternativeToBean(String name) {
+
+ openBeanXMLValidationProblem(ValidationType.ALTERNATIVE_BEAN_XML);
+ String content = bot.editorByTitle(name + ".java").toTextEditor().getText();
+ assertTrue(content.contains("@Alternative"));
+
+ }
+
+ /**
+ * Method corrects Stereotype which has no @Alternative annotation in it
+ * by adding these parameter.
+ * @param name
+ * @param pkg
+ */
+ public void resolveAddAlternativeToStereotype(String name) {
+
+ openBeanXMLValidationProblem(ValidationType.ALTERNATIVE_STEREOTYPE_BEAN_XML);
+ String content = bot.editorByTitle(name + ".java").toTextEditor().getText();
+ assertTrue(content.contains("@Alternative"));
+
+ }
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.quickfix.base;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
+import org.jboss.tools.cdi.bot.test.quickfix.injection.QualifierOperation;
+import org.jboss.tools.cdi.bot.test.quickfix.validators.BeanValidationProvider;
+import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.QuickFixDialogWizard;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.SpecifyBeanDialogWizard;
+import org.jboss.tools.ui.bot.ext.Timing;
+
+public class EligibleInjectionQuickFixTestBase extends QuickFixTestBase{
+
+ private static IValidationProvider validationProvider = new BeanValidationProvider();
+
+ public IValidationProvider validationProvider() {
+ return validationProvider;
+ }
+
+ /**
+ * Method resolves multiple bean injection problem. By setting class which
+ * should be more qualified and qualifier name it resolves this problem.
+ * If qualifier doesn't exist, by using qualifier wizard it creates the new
+ * one and uses it to resolve problem
+ * @param classToQualify
+ * @param qualifier
+ */
+ public void resolveMultipleBeans(ValidationType validationType, String classToQualify,
+ String qualifier, QualifierOperation operation) {
+
+ SWTBotTreeItem validationProblem = getProblem(validationType);
+ assertNotNull(validationProblem);
+
+ quickFixHelper.openQuickFix(validationProblem);
+ QuickFixDialogWizard quickFixWizard = new QuickFixDialogWizard();
+ for (String availableFix : quickFixWizard.getAvailableFixes()) {
+ if (availableFix.contains(classToQualify)) {
+ quickFixWizard.setFix(availableFix).
+ setResource(quickFixWizard.getResources().get(0)).
+ finish();
+ }
+ }
+
+ SpecifyBeanDialogWizard spBeanDialogWizard = new SpecifyBeanDialogWizard();
+ if (operation == QualifierOperation.ADD) {
+ boolean qualifFound = false;
+ for (String availQualifer : spBeanDialogWizard.getAvailableQualifiers()) {
+ if (availQualifer.equals(qualifier + " - " + getPackageName())) {
+ qualifFound = true;
+ spBeanDialogWizard.addQualifier(availQualifer);
+ }
+ }
+ // there was no such qualifer, it has to be created, after creation it
+ // has to be added to in Bean qualifiers
+ if (!qualifFound) {
+ spBeanDialogWizard.createNewQualifier(qualifier, getPackageName()).
+ setName(qualifier).finish();
+ bot.sleep(Timing.time2S());
+ for (String availQualifer : spBeanDialogWizard.getAvailableQualifiers()) {
+ if (availQualifer.equals(qualifier + " - " + getPackageName())) {
+ spBeanDialogWizard.addQualifier(availQualifer);
+ }
+ }
+ }
+
+ } else {
+ for (String inBeanQualifer : spBeanDialogWizard.getInBeanQualifiers()) {
+ if (inBeanQualifer.equals(qualifier + " - " + getPackageName())) {
+ spBeanDialogWizard.removeQualifier(inBeanQualifer);
+ }
+ }
+ }
+
+ spBeanDialogWizard.finish();
+
+ bot.sleep(Timing.time1S());
+ util.waitForNonIgnoredJobs();
+ }
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.quickfix.base;
+
+
+import java.util.List;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.jboss.tools.cdi.bot.test.annotations.ProblemsType;
+import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
+import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.QuickFixDialogWizard;
+import org.junit.BeforeClass;
+
+/**
+ * Test base for all QuickFix-like tests
+ *
+ * @author Jaroslav Jankovic
+ */
+
+public abstract class QuickFixTestBase extends CDITestBase {
+
+ @BeforeClass
+ public static void setup() {
+ problems.show();
+ }
+
+ protected abstract IValidationProvider validationProvider();
+
+ /**
+ * checkQuickFix is the most important method in this class. It
+ * gets validation error prior to component type and annotation type,
+ * then it resolve validation error through quick fix
+ * wizard and finally check if validation errors was fixed through
+ * this wizard
+ * @param validationType
+ * @param compType
+ */
+ public void checkQuickFix(ValidationType validationType) {
+ SWTBotTreeItem validationProblem = getProblem(validationType);
+ assertNotNull(validationProblem);
+ resolveQuickFix(validationProblem);
+ validationProblem = getProblem(validationType);
+ assertNull(validationProblem);
+ }
+
+ /**
+ * Methods gets the particular validation problem located in Problems View by
+ * using specific ValidationErrorsProvider
+ * @param validationType
+ * @param compType
+ * @return
+ */
+ protected SWTBotTreeItem getProblem(ValidationType validationType) {
+ IValidationProvider validationErrorsProvider = validationProvider();
+ List<String> validationProblems = null;
+ SWTBotTreeItem[] problemsInProblemsView = null;
+ if (validationErrorsProvider.getAllWarningsAnnotation().contains(validationType)) {
+ validationProblems = validationErrorsProvider.getAllWarningForAnnotationType(validationType);
+ problemsInProblemsView = quickFixHelper.getProblems(ProblemsType.WARNINGS, getProjectName());
+ } else {
+ validationProblems = validationErrorsProvider.getAllErrorsForAnnotationType(validationType);
+ problemsInProblemsView = quickFixHelper.getProblems(ProblemsType.ERRORS, getProjectName());
+ }
+ for (SWTBotTreeItem ti: problemsInProblemsView) {
+ for (String validationProblem: validationProblems) {
+ if (ti.getText().contains(validationProblem)) {
+ return ti;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Method resolves particular validation problem (parameter ti).
+ * It simply open context menu for param "ti", open menu "Quick Fix" and
+ * chooses first option and confirms it (resolve it)
+ * @param ti
+ */
+ private void resolveQuickFix(SWTBotTreeItem ti) {
+ quickFixHelper.openQuickFix(ti);
+
+ QuickFixDialogWizard qfWizard = new QuickFixDialogWizard();
+
+ String firstFix = qfWizard.getAvailableFixes().get(0);
+ String firstResource = qfWizard.getResources().get(0);
+
+ qfWizard.setFix(firstFix).setResource(firstResource).finish();
+
+ util.waitForNonIgnoredJobs();
+ }
+
+}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/injection/ProblemEligibleInjectionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/injection/ProblemEligibleInjectionTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/injection/ProblemEligibleInjectionTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -13,7 +13,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.EligibleInjectionQuickFixTestBase;
+import org.jboss.tools.cdi.bot.test.quickfix.base.EligibleInjectionQuickFixTestBase;
import org.junit.After;
import org.junit.Test;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeanValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeanValidationQuickFixTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeanValidationQuickFixTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -14,7 +14,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.QuickFixTestBase;
+import org.jboss.tools.cdi.bot.test.quickfix.base.QuickFixTestBase;
import org.jboss.tools.cdi.bot.test.quickfix.validators.BeanValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
import org.junit.Test;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeansXMLValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeansXMLValidationQuickFixTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeansXMLValidationQuickFixTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -12,7 +12,7 @@
package org.jboss.tools.cdi.bot.test.quickfix.test;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
-import org.jboss.tools.cdi.bot.test.quickfix.BeansXMLQuickFixTestBase;
+import org.jboss.tools.cdi.bot.test.quickfix.base.BeansXMLQuickFixTestBase;
import org.junit.Test;
/**
@@ -36,7 +36,7 @@
resolveAddNewAlternative(bean, getPackageName());
- assertTrue(isBeanXMLValidationProblemsEmpty());
+ assertTrue(isBeanXMLValidationErrorEmpty());
}
@Test
@@ -47,7 +47,7 @@
resolveAddNewStereotype(stereotype, getPackageName());
- assertTrue(isBeanXMLValidationProblemsEmpty());
+ assertTrue(isBeanXMLValidationErrorEmpty());
}
@@ -62,7 +62,7 @@
resolveAddAlternativeToBean(bean);
- assertTrue(isBeanXMLValidationProblemsEmpty());
+ assertTrue(isBeanXMLValidationErrorEmpty());
}
@@ -77,7 +77,7 @@
resolveAddAlternativeToStereotype(stereotype);
- assertTrue(isBeanXMLValidationProblemsEmpty());
+ assertTrue(isBeanXMLValidationErrorEmpty());
}
@@ -90,7 +90,7 @@
resolveAddNewInterceptor(interceptor, getPackageName());
- assertTrue(isBeanXMLValidationProblemsEmpty());
+ assertTrue(isBeanXMLValidationErrorEmpty());
}
@@ -102,7 +102,7 @@
resolveAddNewDecorator(decorator, getPackageName());
- assertTrue(isBeanXMLValidationProblemsEmpty());
+ assertTrue(isBeanXMLValidationErrorEmpty());
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/DecoratorValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/DecoratorValidationQuickFixTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/DecoratorValidationQuickFixTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -14,7 +14,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.QuickFixTestBase;
+import org.jboss.tools.cdi.bot.test.quickfix.base.QuickFixTestBase;
import org.jboss.tools.cdi.bot.test.quickfix.validators.DecoratorValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
import org.junit.Test;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/IBindingValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/IBindingValidationQuickFixTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/IBindingValidationQuickFixTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -14,7 +14,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.QuickFixTestBase;
+import org.jboss.tools.cdi.bot.test.quickfix.base.QuickFixTestBase;
import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.InterceptorBindingValidationProvider;
import org.junit.Test;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/InterceptorValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/InterceptorValidationQuickFixTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/InterceptorValidationQuickFixTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -14,7 +14,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.QuickFixTestBase;
+import org.jboss.tools.cdi.bot.test.quickfix.base.QuickFixTestBase;
import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.InterceptorValidationProvider;
import org.junit.Test;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/QualifierValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/QualifierValidationQuickFixTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/QualifierValidationQuickFixTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -14,7 +14,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.QuickFixTestBase;
+import org.jboss.tools.cdi.bot.test.quickfix.base.QuickFixTestBase;
import org.jboss.tools.cdi.bot.test.quickfix.validators.QualifierValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
import org.junit.Test;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/ScopeValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/ScopeValidationQuickFixTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/ScopeValidationQuickFixTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -14,7 +14,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.QuickFixTestBase;
+import org.jboss.tools.cdi.bot.test.quickfix.base.QuickFixTestBase;
import org.jboss.tools.cdi.bot.test.quickfix.validators.ScopeValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
import org.junit.Test;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/StereotypeValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/StereotypeValidationQuickFixTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/StereotypeValidationQuickFixTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -14,7 +14,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.annotations.ValidationType;
-import org.jboss.tools.cdi.bot.test.quickfix.QuickFixTestBase;
+import org.jboss.tools.cdi.bot.test.quickfix.base.QuickFixTestBase;
import org.jboss.tools.cdi.bot.test.quickfix.validators.StereotypeValidationProvider;
import org.jboss.tools.cdi.bot.test.quickfix.validators.IValidationProvider;
import org.junit.Test;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeansXmlValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeansXmlValidationProvider.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeansXmlValidationProvider.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -36,6 +36,15 @@
problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.ALTERNATIVE_STEREOTYPE_BEAN_XML,
"<stereotype> element must specify the name of an @Alternative stereotype annotation"));
+ problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.SPECIFY_ALTERNATIVE,
+ "must specify the name of an alternative bean class"));
+
+ problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.SPECIFY_DECORATOR,
+ "must specify the name of a decorator bean class"));
+
+ problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.SPECIFY_INTERCEPTOR,
+ "must specify the name of an interceptor class"));
+
}
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.uiutils;
+
+import org.jboss.tools.cdi.bot.test.CDIBase;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
+import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
+import org.jboss.tools.cdi.bot.test.openon.OpenOnTest;
+import org.jboss.tools.ui.bot.ext.Timing;
+
+/**
+ * Helper for beans.xml validation
+ *
+ * @author Jaroslav Jankovic
+ *
+ */
+
+public class BeansXMLHelper extends CDIBase {
+
+ private static final String CLEAR_BEANS_XML = "/resources/beansXML/" +
+ "beans.xml.cdi";
+ private static final String CLEAR_BEANS_XML_WITH_TAG = "/resources/beansXML/" +
+ "beansXmlWithEmptyTag.xml.cdi";
+ private static final String BEANS_XML_WITH_INTERCEPTOR = "/resources/beansXML/" +
+ "beansXmlWithInterceptor.xml.cdi";
+ private static final String BEANS_XML_WITH_DECORATOR = "/resources/beansXML/" +
+ "beansXmlWithDecorator.xml.cdi";
+ private static final String BEANS_XML_WITH_STEREOTYPE = "/resources/beansXML/" +
+ "beansXmlWithStereotype.xml.cdi";
+ private static final String BEANS_XML_WITH_ALTERNATIVE = "/resources/beansXML/" +
+ "beansXmlWithAlternative.xml.cdi";
+
+ /**
+ * Methods creates beans.xml with no tags for entered project.
+ * @param projectName
+ */
+ public void createEmptyBeansXML(String projectName) {
+
+ createBeansXML(projectName);
+ replaceBeansXMLContent(projectName, CLEAR_BEANS_XML);
+
+ }
+
+ /**
+ * Methods creates beans.xml with empty tag <> for entered project.
+ * @param projectName
+ */
+ public void createBeansXMLWithEmptyTag(String projectName) {
+
+ createBeansXML(projectName);
+ replaceBeansXMLContent(projectName, CLEAR_BEANS_XML_WITH_TAG);
+ }
+
+ /**
+ * Methods creates beans.xml with interceptor tags in it for entered project.
+ * Package and interceptor component name which should be showed in tag is
+ * determined by parameters. If className is null, then Component text will be
+ * removed
+ * @param projectName
+ * @param packageName
+ * @param className
+ */
+ public void createBeansXMLWithInterceptor(String projectName, String packageName,
+ String className) {
+
+ createBeansXML(projectName);
+ replaceBeansXMLContent(projectName, BEANS_XML_WITH_INTERCEPTOR);
+ if (className == null || className.length() == 0) {
+ editResourceUtil.replaceInEditor("<class>Component</class>",
+ "<class></class>");
+ } else {
+ editResourceUtil.replaceInEditor("Component", packageName + "." + className);
+ }
+
+ }
+
+ /**
+ * Methods creates beans.xml with decorator tags in it for entered project.
+ * Package and decorator component name which should be showed in tag is
+ * determined by parameters. If className is null, then Component text will be
+ * removed
+ * @param projectName
+ * @param packageName
+ * @param className
+ */
+ public void createBeansXMLWithDecorator(String projectName, String packageName,
+ String className) {
+
+ createBeansXML(projectName);
+ replaceBeansXMLContent(projectName, BEANS_XML_WITH_DECORATOR);
+ if (className == null || className.length() == 0) {
+ editResourceUtil.replaceInEditor("<class>Component</class>",
+ "<class></class>");
+ } else {
+ editResourceUtil.replaceInEditor("Component", packageName + "." + className);
+ }
+
+ }
+
+ /**
+ * Methods creates beans.xml with stereotype tags in it for entered project.
+ * Package and stereotype component name which should be showed in tag is
+ * determined by parameters. If className is null, then Component text will be
+ * removed
+ * @param projectName
+ * @param packageName
+ * @param className
+ */
+ public void createBeansXMLWithStereotype(String projectName, String packageName,
+ String className) {
+
+ createBeansXML(projectName);
+ replaceBeansXMLContent(projectName, BEANS_XML_WITH_STEREOTYPE);
+ if (className == null || className.length() == 0) {
+ editResourceUtil.replaceInEditor("<stereotype>Component</stereotype>",
+ "<stereotype></stereotype>");
+ } else {
+ editResourceUtil.replaceInEditor("Component", packageName + "." + className);
+ }
+
+ }
+
+ /**
+ * Methods creates beans.xml with alternative tags in it for entered project.
+ * Package and alternative bean component name which should be showed in tag is
+ * determined by parameters. If className is null, then Component text will be
+ * removed
+ * @param projectName
+ * @param packageName
+ * @param className
+ */
+ public void createBeansXMLWithAlternative(String projectName, String packageName,
+ String className) {
+
+ createBeansXML(projectName);
+ replaceBeansXMLContent(projectName, BEANS_XML_WITH_ALTERNATIVE);
+ if (className == null || className.length() == 0) {
+ editResourceUtil.replaceInEditor("<class>Component</class>",
+ "<class></class>");
+ } else {
+ editResourceUtil.replaceInEditor("Component", packageName + "." + className);
+ }
+ }
+
+ /**
+ * If there is no beans.xml file in the project, then this method creates a new one
+ * @param projectName
+ */
+ private void createBeansXML(String projectName) {
+
+ if (!projectExplorer.isFilePresent(projectName,
+ CDIConstants.META_INF_BEANS_XML_PATH.split("/")) &&
+ !projectExplorer.isFilePresent(projectName,
+ CDIConstants.WEB_INF_BEANS_XML_PATH.split("/"))) {
+
+ wizard.createCDIComponent(CDIWizardType.BEANS_XML, null,
+ projectName + "/" + CDIConstants.WEBCONTENT + "/" +
+ CDIConstants.WEB_INF, null);
+ }
+ }
+
+ /**
+ * Methods create beans.xml for entered project with content of file
+ * determined by parameter path. If there is beans.xml in project, its
+ * content is simply replaced
+ * @param projectName
+ * @param path
+ */
+ private void replaceBeansXMLContent(String projectName, String path) {
+
+ if (projectExplorer.isFilePresent(projectName,
+ CDIConstants.WEB_INF_BEANS_XML_PATH.split("/"))) {
+ projectExplorer.openFile(projectName, CDIConstants.WEB_INF_BEANS_XML_PATH.split("/"));
+ }else {
+ projectExplorer.openFile(projectName, CDIConstants.META_INF_BEANS_XML_PATH.split("/"));
+ }
+ bot.cTabItem("Source").activate();
+ setEd(bot.activeEditor().toTextEditor());
+ editResourceUtil.replaceClassContentByResource(OpenOnTest.class
+ .getResourceAsStream(path),
+ false);
+ bot.sleep(Timing.time500MS());
+ }
+
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.cdi.bot.test.uiutils;
-
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.cdi.bot.test.CDIBase;
-import org.jboss.tools.cdi.bot.test.annotations.BeansXMLValidationErrors;
-import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
-import org.jboss.tools.cdi.bot.test.openon.OpenOnTest;
-import org.jboss.tools.ui.bot.ext.Timing;
-import org.jboss.tools.ui.bot.ext.view.ProblemsView;
-
-/**
- * Helper for beans.xml validation
- *
- * @author Jaroslav Jankovic
- *
- */
-
-public class BeansXMLValidationHelper extends CDIBase {
-
- private static final String CLEAR_BEANS_XML = "/resources/beansXML/beans.xml.cdi";
- private static final String CLEAR_BEANS_XML_WITH_TAG = "/resources/beansXML/" +
- "beansXmlWithEmptyTag.xml.cdi";
- private static final String BEANS_XML_WITH_INTERCEPTOR = "/resources/beansXML/" +
- "beansXmlWithInterceptor.xml.cdi";
- private static final String BEANS_XML_WITH_DECORATOR = "/resources/beansXML/" +
- "beansXmlWithDecorator.xml.cdi";
- private static final String BEANS_XML_WITH_STEREOTYPE = "/resources/beansXML/" +
- "beansXmlWithStereotype.xml.cdi";
- private static final String BEANS_XML_WITH_ALTERNATIVE = "/resources/beansXML/" +
- "beansXmlWithAlternative.xml.cdi";
-
- /**
- * Method checks if there is validation problem with text
- * specified by parameter validationErrors for entered project
- * @param validationError
- * @return
- */
- public boolean checkValidationErrorInBeansXML(String projectName,
- BeansXMLValidationErrors validationError) {
- SWTBotTreeItem[] validationErrors = getBeansXMLValidationErrors(projectName);
- return ((validationErrors.length == 1) &&
- (validationErrors[0].getText().contains(validationError.message())));
- }
-
- /**
- * Method checks if there is no validation problem when
- * creating interceptor component with entered className
- * packageName for project with name projectName and
- * insert tag containing this interceptor
- * @param projectName
- * @param packageName
- * @param className
- * @return
- */
- public boolean checkInterceptorInBeansXML(String projectName,
- String packageName, String className) {
- createBeansXMLWithInterceptor(projectName, packageName, className);
- return getBeansXMLValidationErrors(projectName).length == 0;
- }
-
- /**
- * Method checks if there is no validation problem when
- * creating decorator component with entered className
- * packageName for project with name projectName and
- * insert tag containing this decorator
- * @param projectName
- * @param packageName
- * @param className
- * @return
- */
- public boolean checkDecoratorInBeansXML(String projectName,
- String packageName, String className) {
- createBeansXMLWithDecorator(projectName, packageName, className);
- return getBeansXMLValidationErrors(projectName).length == 0;
- }
-
- /**
- * Method checks if there is no validation problem when
- * creating alternative bean component with entered className
- * packageName for project with name projectName and
- * insert tag containing this alternative
- * @param projectName
- * @param packageName
- * @param className
- * @return
- */
- public boolean checkAlternativeInBeansXML(String projectName,
- String packageName, String className) {
- createBeansXMLWithAlternative(projectName, packageName, className);
- return getBeansXMLValidationErrors(projectName).length == 0;
- }
-
- /**
- * Method gets all beans.xml validation errors showed in Problems View
- * for entered project
- * @return
- */
- public SWTBotTreeItem[] getBeansXMLValidationErrors(String projectName) {
- return ProblemsView.getFilteredErrorsTreeItems(bot, null, "/"
- + projectName, "beans.xml", "CDI Problem");
- }
-
- /**
- * Methods creates beans.xml with no tags for entered project.
- * @param projectName
- */
- public void createClearBeansXML(String projectName) {
-
- createBeansXMLWithContent(projectName, CLEAR_BEANS_XML);
-
- }
-
- /**
- * Methods creates beans.xml with empty tag <> for entered project.
- * @param projectName
- */
- public void createClearBeansXMLWithEmptyTag(String projectName) {
-
- createBeansXMLWithContent(projectName, CLEAR_BEANS_XML_WITH_TAG);
- }
-
- /**
- * Methods creates beans.xml with interceptor tags in it for entered project.
- * Package and interceptor component name which should be showed in tag is
- * determined by parameters. If className is null, then Component text will be
- * removed
- * @param projectName
- * @param packageName
- * @param className
- */
- public void createBeansXMLWithInterceptor(String projectName, String packageName,
- String className) {
-
- createBeansXMLWithContent(projectName, BEANS_XML_WITH_INTERCEPTOR);
- if (className == null || className.length() == 0) {
- editResourceUtil.replaceInEditor("<class>Component</class>",
- "<class></class>");
- } else {
- editResourceUtil.replaceInEditor("Component", packageName + "." + className);
- }
-
- }
-
- /**
- * Methods creates beans.xml with decorator tags in it for entered project.
- * Package and decorator component name which should be showed in tag is
- * determined by parameters. If className is null, then Component text will be
- * removed
- * @param projectName
- * @param packageName
- * @param className
- */
- public void createBeansXMLWithDecorator(String projectName, String packageName,
- String className) {
-
- createBeansXMLWithContent(projectName, BEANS_XML_WITH_DECORATOR);
- if (className == null || className.length() == 0) {
- editResourceUtil.replaceInEditor("<class>Component</class>",
- "<class></class>");
- } else {
- editResourceUtil.replaceInEditor("Component", packageName + "." + className);
- }
-
- }
-
- /**
- * Methods creates beans.xml with stereotype tags in it for entered project.
- * Package and stereotype component name which should be showed in tag is
- * determined by parameters. If className is null, then Component text will be
- * removed
- * @param projectName
- * @param packageName
- * @param className
- */
- public void createBeansXMLWithStereotype(String projectName, String packageName,
- String className) {
-
- createBeansXMLWithContent(projectName, BEANS_XML_WITH_STEREOTYPE);
- if (className == null || className.length() == 0) {
- editResourceUtil.replaceInEditor("<stereotype>Component</stereotype>",
- "<stereotype></stereotype>");
- } else {
- editResourceUtil.replaceInEditor("Component", packageName + "." + className);
- }
-
- }
-
- /**
- * Methods creates beans.xml with alternative tags in it for entered project.
- * Package and alternative bean component name which should be showed in tag is
- * determined by parameters. If className is null, then Component text will be
- * removed
- * @param projectName
- * @param packageName
- * @param className
- */
- public void createBeansXMLWithAlternative(String projectName, String packageName,
- String className) {
-
- createBeansXMLWithContent(projectName, BEANS_XML_WITH_ALTERNATIVE);
- if (className == null || className.length() == 0) {
- editResourceUtil.replaceInEditor("<class>Component</class>",
- "<class></class>");
- } else {
- editResourceUtil.replaceInEditor("Component", packageName + "." + className);
- }
- }
-
- /**
- * Methods create beans.xml for entered project with content of file
- * determined by parameter path. If there is beans.xml in project, its
- * content is simply replaced
- * @param projectName
- * @param path
- */
- private void createBeansXMLWithContent(String projectName, String path) {
-
- if (!projectExplorer.isFilePresent(projectName,
- "WebContent/META-INF/beans.xml".split("/")) &&
- !projectExplorer.isFilePresent(projectName,
- "WebContent/WEB-INF/beans.xml".split("/"))) {
- wizard.createCDIComponent(CDIWizardType.BEANS_XML, null,
- projectName + "/WebContent/WEB-INF", null);
- }
- if (!projectExplorer.isFilePresent(projectName,
- "WebContent/META-INF/beans.xml".split("/"))) {
- projectExplorer.openFile(projectName, "WebContent/WEB-INF/beans.xml".split("/"));
- }else {
- projectExplorer.openFile(projectName, "WebContent/META-INF/beans.xml".split("/"));
- }
- bot.cTabItem("Source").activate();
- setEd(bot.activeEditor().toTextEditor());
- editResourceUtil.replaceClassContentByResource(OpenOnTest.class
- .getResourceAsStream(path),
- false);
- bot.sleep(Timing.time500MS());
- }
-
-}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -16,6 +16,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.cdi.bot.test.CDIBase;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.uiutils.actions.NewFileWizardAction;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.DynamicWebProjectWizard;
import org.jboss.tools.ui.bot.ext.Timing;
@@ -23,16 +24,6 @@
public class CDIProjectHelper extends CDIBase{
- private final String CDI_WEB_PROJECT = "CDI Web Project";
- private final String CDI_GROUP = "CDI (Context and Dependency Injection)";
- private final String WEB_GROUP = "Web";
- private final String DYNAMIC_WEB_PROJECT = "Dynamic Web Project";
- private final String CONFIGURE = "Configure";
- private final String ADD_CDI_SUPPORT = "Add CDI (Context and Dependency Injection) support...";
- private final String PROPERTIES = "Properties";
- private final String CDI_PROPERTIES_SETTINGS = "CDI (Context and Dependency Injection) Settings";
-
-
/**
* Method creates new CDI Project with CDI Web Project wizard
* @param projectName
@@ -40,9 +31,11 @@
public void createCDIProjectWithCDIWizard(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate(CDI_GROUP, CDI_WEB_PROJECT).next();
- new DynamicWebProjectWizard().setProjectName(projectName).finish();
- util.waitForNonIgnoredJobs();
+ .selectTemplate(CDIConstants.CDI_GROUP, CDIConstants.CDI_WEB_PROJECT).next();
+ new DynamicWebProjectWizard().setProjectName(projectName).finish();
+ bot.sleep(Timing.time5S());
+ util.waitForNonIgnoredJobs();
+ bot.sleep(Timing.time5S());
}
/**
@@ -61,7 +54,7 @@
*/
public void createDynamicWebProjectWithCDIPreset(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate(WEB_GROUP, DYNAMIC_WEB_PROJECT).next();
+ .selectTemplate(CDIConstants.WEB_GROUP, CDIConstants.DYNAMIC_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).setCDIPreset().finish();
util.waitForNonIgnoredJobs();
}
@@ -72,7 +65,7 @@
*/
public void createDynamicWebProjectWithCDIFacets(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate(WEB_GROUP, DYNAMIC_WEB_PROJECT).next();
+ .selectTemplate(CDIConstants.WEB_GROUP, CDIConstants.DYNAMIC_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).setCDIFacet().finish();
bot.sleep(Timing.time5S());
util.waitForNonIgnoredJobs();
@@ -100,7 +93,7 @@
*/
private void createDynamicWebProject(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate(WEB_GROUP, DYNAMIC_WEB_PROJECT).next();
+ .selectTemplate(CDIConstants.WEB_GROUP, CDIConstants.DYNAMIC_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).finish();
util.waitForNonIgnoredJobs();
}
@@ -114,7 +107,8 @@
SWTBotTree tree = projectExplorer.bot().tree();
SWTBotTreeItem item = tree.getTreeItem(projectName);
item.expand();
- NodeContextUtil.nodeContextMenu(tree, item, CONFIGURE, ADD_CDI_SUPPORT).click();
+ NodeContextUtil.nodeContextMenu(tree, item, CDIConstants.CONFIGURE,
+ CDIConstants.ADD_CDI_SUPPORT).click();
bot.activeShell().bot().button("OK").click();
bot.sleep(Timing.time2S());
util.waitForNonIgnoredJobs();
@@ -130,9 +124,9 @@
SWTBotTree tree = projectExplorer.bot().tree();
ContextMenuHelper.prepareTreeItemForContextMenu(tree);
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,PROPERTIES,false)).click();
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,CDIConstants.PROPERTIES,false)).click();
- bot.tree().expandNode(CDI_PROPERTIES_SETTINGS).select();
+ bot.tree().expandNode(CDIConstants.CDI_PROPERTIES_SETTINGS).select();
boolean isCDISupported = bot.checkBox().isChecked();
bot.button("Cancel").click();
return isCDISupported;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -185,7 +185,7 @@
SWTBotTreeItem item = projectExplorer.selectTreeItem(folderName, path);
NodeContextUtil.nodeContextMenu(tree, item, "Delete").click();
- bot.sleep(Timing.time1S());
+ bot.sleep(Timing.time3S());
bot.shell("Confirm Delete").bot().button("OK").click();
}
@@ -205,7 +205,7 @@
bot.button("OK").click();
- bot.sleep(Timing.time2S());
+ bot.sleep(Timing.time3S());
}
/**
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/LibraryHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/LibraryHelper.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/LibraryHelper.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -23,6 +23,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.cdi.bot.test.CDIBase;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.PluginActivator;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.Timing;
@@ -41,14 +42,14 @@
SWTBotTree tree = projectExplorer.bot().tree();
ContextMenuHelper.prepareTreeItemForContextMenu(tree);
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,"Refresh",false)).click();
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,CDIConstants.REFRESH,false)).click();
ContextMenuHelper.prepareTreeItemForContextMenu(tree);
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,"Properties",false)).click();
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,CDIConstants.PROPERTIES,false)).click();
- bot.tree().expandNode("Java Build Path").select();
- bot.tabItem("Libraries").activate();
- bot.button("Add JARs...").click();
+ bot.tree().expandNode(CDIConstants.JAVA_BUILD_PATH).select();
+ bot.tabItem(CDIConstants.LIBRARIES).activate();
+ bot.button(CDIConstants.ADD_JARS).click();
bot.sleep(Timing.time500MS());
String file = libraryName;
bot.tree().expandNode(projectName).expandNode(file).select();
@@ -97,14 +98,14 @@
SWTBotTree tree = projectExplorer.bot().tree();
ContextMenuHelper.prepareTreeItemForContextMenu(tree);
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,"Properties",false)).click();
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, CDIConstants.PROPERTIES, false)).click();
SWTBotShell shell = bot.shell("Properties for " + projectName);
SWTBot bot = shell.bot();
- bot.tree().expandNode("Java Build Path").select();
+ bot.tree().expandNode(CDIConstants.JAVA_BUILD_PATH).select();
- bot.tabItem("Libraries").activate();
+ bot.tabItem(CDIConstants.LIBRARIES).activate();
boolean libraryInProject = false;
for (int i = 0; i < bot.tree(1).rowCount(); i++) {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -16,6 +16,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.jboss.tools.cdi.bot.test.CDIBase;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
import org.jboss.tools.ui.bot.ext.Timing;
@@ -32,9 +33,9 @@
*/
public void openOnByOption(String openOnString, String titleName, String chosenOption) {
selectTextForOpenOn(openOnString, titleName);
- SWTBotMenu navigateMenu = bot.menu("Navigate");
+ SWTBotMenu navigateMenu = bot.menu(CDIConstants.NAVIGATE);
bot.sleep(Timing.time500MS());
- navigateMenu.menu("Open Hyperlink").click();
+ navigateMenu.menu(CDIConstants.OPEN_HYPERLINK).click();
bot.sleep(Timing.time500MS());
SWTBotTable table = bot.activeShell().bot().table(0);
for (int i = 0; i < table.rowCount(); i++) {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/QuickFixHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/QuickFixHelper.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/QuickFixHelper.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -12,6 +12,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.cdi.bot.test.CDIBase;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.annotations.ProblemsType;
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
@@ -22,7 +23,7 @@
* @param item
*/
public void openQuickFix(SWTBotTreeItem item) {
- NodeContextUtil.nodeContextMenu(bot.tree(), item, "Quick Fix").click();
+ NodeContextUtil.nodeContextMenu(bot.tree(), item, CDIConstants.QUICK_FIX).click();
}
/**
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/SWTEclipseCDIExtUtil.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/SWTEclipseCDIExtUtil.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/SWTEclipseCDIExtUtil.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -12,6 +12,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
@@ -43,8 +44,8 @@
private static void editFolding(SWTBotExt bot, SWTUtilExt util,
boolean select) {
- bot.menu("Window").menu("Preferences").click();
- bot.shell("Preferences").activate();
+ bot.menu(CDIConstants.WINDOW).menu(CDIConstants.PREFERENCES).click();
+ bot.shell(CDIConstants.PREFERENCES).activate();
SWTBotTreeItem item = bot.tree(0).expandNode("Java", "Editor");
item.select("Folding");
SWTBotCheckBox foldCheckBox = bot.checkBox("Enable folding");
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.bot.test.uiutils.actions;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBase;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.Wizard;
@@ -27,7 +28,7 @@
@Override
public CDIWizardBase run() {
Wizard w = super.run();
- w.selectTemplate("CDI (Context and Dependency Injection)", type.getAnnotationType());
+ w.selectTemplate(CDIConstants.CDI_GROUP, type.getAnnotationType());
w.next();
return new CDIWizardBase(type);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/DynamicWebProjectWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/DynamicWebProjectWizard.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/DynamicWebProjectWizard.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -16,16 +16,12 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.ui.bot.ext.Timing;
public class DynamicWebProjectWizard extends Wizard {
private final String PROJECT_NAME = "Project name:";
- private final String CDI_PRESET = "Dynamic Web Project " +
- "with CDI (Context and Dependency Injection)";
- private final String CDI_FACET = "CDI (Contexts and Dependency Injection)";
- private final String CONFIGURATION = "Configuration";
- private final String PROJECT_FACETS = "Project Facets";
public DynamicWebProjectWizard() {
super(new SWTBot().activeShell().widget);
@@ -38,8 +34,8 @@
}
public DynamicWebProjectWizard setCDIPreset() {
- bot().comboBoxInGroup(CONFIGURATION, 0).
- setSelection(CDI_PRESET);
+ bot().comboBoxInGroup(CDIConstants.CONFIGURATION, 0).
+ setSelection(CDIConstants.CDI_PRESET);
return this;
}
@@ -51,11 +47,11 @@
}
private void setCDIFacetInFacets(SWTBot bot) {
- assertTrue(bot.activeShell().getText().equals(PROJECT_FACETS));
+ assertTrue(bot.activeShell().getText().equals(CDIConstants.PROJECT_FACETS));
SWTBot facetsBot = bot.activeShell().bot();
SWTBotTree tree= facetsBot.tree();
for (SWTBotTreeItem ti: tree.getAllItems()) {
- if (ti.cell(0).contains(CDI_FACET)) {
+ if (ti.cell(0).contains(CDIConstants.CDI_FACET)) {
ti.check();
break;
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/QuickFixDialogWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/QuickFixDialogWizard.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/QuickFixDialogWizard.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -15,10 +15,11 @@
import java.util.List;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
public class QuickFixDialogWizard extends Wizard {
- private static final String QUICK_FIX_TITLE = "Quick Fix";
+ private static final String QUICK_FIX_TITLE = CDIConstants.QUICK_FIX;
private List<String> availableFixes = null;
private List<String> resources = null;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/SearchNamedDialogWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/SearchNamedDialogWizard.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/SearchNamedDialogWizard.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -15,16 +15,16 @@
import java.util.List;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.ui.bot.ext.Timing;
public class SearchNamedDialogWizard extends Wizard {
- private static final String NAMED_SEARCH_TITLE = "Open CDI Named Bean";
private List<String> matchingItems = null;
public SearchNamedDialogWizard() {
super(new SWTBot().activeShell().widget);
- assert (NAMED_SEARCH_TITLE).equals(getText());
+ assert (CDIConstants.OPEN_CDI_NAMED_BEANS).equals(getText());
matchingItems = new ArrayList<String>();
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2012-01-24 10:42:38 UTC (rev 38081)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2012-01-24 10:47:26 UTC (rev 38082)
@@ -12,6 +12,7 @@
package org.jboss.tools.cdi.bot.test.wizard;
import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.CDISmokeBotTests;
import org.jboss.tools.cdi.bot.test.CDITestBase;
import org.junit.Test;
@@ -43,7 +44,8 @@
if (projectHelper.projectExists(getProjectName())) {
LOGGER.info("Dynamic Web Project with CDI Facet created");
assertTrue("Error: beans.xml should be created when selecting CDI Facet",
- projectExplorer.isFilePresent(getProjectName(), "WebContent/WEB-INF/beans.xml".split("/")));
+ projectExplorer.isFilePresent(getProjectName(),
+ CDIConstants.WEB_INF_BEANS_XML_PATH.split("/")));
} else {
fail("CDI project was not succesfully created with Dynamic Web Project wizard with CDI facet");
}
12 years, 11 months
JBoss Tools SVN: r38081 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-24 05:42:38 -0500 (Tue, 24 Jan 2012)
New Revision: 38081
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIWebProjectWizardTest.java
Log:
CDIWebProjectWizardTest added
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIWebProjectWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIWebProjectWizardTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIWebProjectWizardTest.java 2012-01-24 10:42:38 UTC (rev 38081)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.wizard;
+
+import org.jboss.tools.cdi.bot.test.CDIConstants;
+import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.junit.Test;
+
+public class CDIWebProjectWizardTest extends CDITestBase {
+
+ @Override
+ public void prepareWorkspace() {
+ if (!projectHelper.projectExists(getProjectName())) {
+ projectHelper.createCDIProjectWithCDIWizard(getProjectName());
+ }
+ }
+
+ @Override
+ public String getProjectName() {
+ return "CDIWebProject";
+ }
+
+ @Test
+ public void testCDIWizard() {
+ if (projectHelper.projectExists(getProjectName())) {
+ LOGGER.info("CDI project was sucessfully created by CDI Web Project wizard");
+ assertTrue(projectHelper.checkCDISupport(getProjectName()));
+ LOGGER.info("Project has correctly set CDI support");
+ assertTrue("Error: beans.xml should be created when using CDI Web Project wizard",
+ projectExplorer.isFilePresent(getProjectName(),
+ CDIConstants.WEB_INF_BEANS_XML_PATH.split("/")));
+ } else {
+ fail("CDI project was not succesfully created by CDI Web Project wizard");
+ }
+
+ }
+
+}
12 years, 11 months
JBoss Tools SVN: r38080 - in trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test: resources and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: sbunciak
Date: 2012-01-24 05:42:01 -0500 (Tue, 24 Jan 2012)
New Revision: 38080
Added:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DeleteAppAS7.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DestroyDomain.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/EmbeddCartrides.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ImportRepublishAppASS7.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RenameDomain.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeysManagment.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/TestProperties.java
Removed:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/screenshots/Default - testUserCredentialsValidation(org.jboss.tools.openshift.ui.bot.test.CredentialsValidation).jpeg
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/screenshots/screenshot-CredentialsValidation.testUserCredentialsValidation.jpeg
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DomainManipulation.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftTestProperties.java
Modified:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/resources/openshift.ui.bot.test.properties
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CredentialsValidation.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java
Log:
Completed bot tests coverage
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF 2012-01-24 10:41:53 UTC (rev 38079)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF 2012-01-24 10:42:01 UTC (rev 38080)
@@ -17,6 +17,9 @@
org.eclipse.swtbot.swt.finder;bundle-version="2.0.5",
org.eclipse.core.resources;bundle-version="3.7.100",
org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.ui.ide;bundle-version="3.7.0"
+ org.eclipse.ui.ide;bundle-version="3.7.0",
+ org.apache.commons.httpclient;bundle-version="3.1.0",
+ org.apache.commons.logging;bundle-version="1.0.4",
+ org.apache.commons.codec;bundle-version="1.3.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/resources/openshift.ui.bot.test.properties
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/resources/openshift.ui.bot.test.properties 2012-01-24 10:41:53 UTC (rev 38079)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/resources/openshift.ui.bot.test.properties 2012-01-24 10:42:01 UTC (rev 38080)
@@ -1,4 +1,9 @@
openshift.user.name=sbunciak
openshift.user.pwd=rhtest123
+openshift.jbossapp.name=jbossapp
+openshift.jbossapp.cartridges=mysql-5.1;jenkins-client-1.4
openshift.user.wrongpwd=rhtest
openshift.domain=rhtestdomain
+openshift.domain.new=rhtest
+openshift.ssh.passphrase=uvegel4ROV?
+createDomain=true
Deleted: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/screenshots/Default - testUserCredentialsValidation(org.jboss.tools.openshift.ui.bot.test.CredentialsValidation).jpeg
===================================================================
(Binary files differ)
Deleted: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/screenshots/screenshot-CredentialsValidation.testUserCredentialsValidation.jpeg
===================================================================
(Binary files differ)
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateAppAS7.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,34 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+public class CreateAppAS7 extends SWTTestExt {
+
+ @Test
+ public void createApplication() {
+ bot.button(IDELabel.Menu.NEW).click();
+
+ SWTBotText appNameText = bot.text(0);
+
+ assertTrue("App name should be empty!", appNameText.getText()
+ .equals(""));
+
+ appNameText.setText(TestProperties
+ .getProperty("openshift.jbossapp.name"));
+
+ bot.comboBox(0).setSelection("jbossas-7.0");
+
+ bot.button(IDELabel.Button.FINISH).click();
+
+ bot.waitUntil(Conditions.shellCloses(bot.activeShell()));
+
+ assertTrue(bot.tableInGroup("Available Applications").containsItem(
+ TestProperties.getProperty("openshift.jbossapp.name")));
+ }
+
+}
Copied: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java (from rev 36826, trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DomainManipulation.java)
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CreateDomain.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,30 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.junit.Test;
+
+public class CreateDomain extends SWTTestExt {
+
+ @Test
+ public void domainCreate() {
+
+ // create domain only if explicit configured
+ if (Boolean.parseBoolean(TestProperties.getProperty("createDomain"))) {
+
+ SWTBotText domainText = bot.textInGroup("Domain", 0);
+
+ bot.waitUntil(Conditions.widgetIsEnabled(domainText));
+
+ assertTrue("Domain should not be set at this stage!", domainText
+ .getText().equals(""));
+
+ domainText.setText(TestProperties.getProperty("openshift.domain"));
+
+ bot.button("Create").click();
+ }
+ }
+
+}
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CredentialsValidation.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CredentialsValidation.java 2012-01-24 10:41:53 UTC (rev 38079)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/CredentialsValidation.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -4,10 +4,11 @@
import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
import org.eclipse.swtbot.swt.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
-import org.jboss.tools.openshift.ui.bot.util.OpenShiftTestProperties;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
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.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Test;
@Require(clearWorkspace = true)
@@ -25,16 +26,14 @@
validateButton.isEnabled());
// set wrong user credentials
- wiz.text(0).setText(
- OpenShiftTestProperties.getProperty("openshift.user.name"));
- wiz.text(1).setText(
- OpenShiftTestProperties.getProperty("openshift.user.wrongpwd"));
+ wiz.text(0).setText(TestProperties.getProperty("openshift.user.name"));
+ wiz.text(1).setText(TestProperties.getProperty("openshift.user.wrongpwd"));
assertTrue(
"Validation button should be enabled to check the user credentials.",
validateButton.isEnabled());
- SWTBotButton nextButton = wiz.button("Next >");
+ SWTBotButton nextButton = wiz.button(IDELabel.Button.NEXT);
// try to move forward
nextButton.click();
@@ -46,12 +45,9 @@
assertFalse("Next > button shouldn't be enabled to move forward.",
nextButton.isEnabled());
- // test on changed credentials
// set correct user credentials
- wiz.text(0).setText(
- OpenShiftTestProperties.getProperty("openshift.user.name"));
- wiz.text(1).setText(
- OpenShiftTestProperties.getProperty("openshift.user.pwd"));
+ wiz.text(0).setText(TestProperties.getProperty("openshift.user.name"));
+ wiz.text(1).setText(TestProperties.getProperty("openshift.user.pwd"));
assertTrue(
"Validation button should be enabled again, user credentials has been changed.",
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DeleteAppAS7.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DeleteAppAS7.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DeleteAppAS7.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,108 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+public class DeleteAppAS7 extends SWTTestExt {
+ @Test
+ public void deleteApplication() {
+ SWTBot wiz = open.newObject(ActionItem.NewObject.create("OpenShift",
+ "OpenShift Express Application"));
+ wiz.text(0).setText(TestProperties.getProperty("openshift.user.name"));
+ wiz.text(1).setText(TestProperties.getProperty("openshift.user.pwd"));
+ wiz.button(IDELabel.Button.NEXT).click();
+
+ SWTBotText domainText = bot.textInGroup("Domain", 0);
+ bot.waitUntil(Conditions.widgetIsEnabled(domainText));
+
+ SWTBotTable appTable = bot.tableInGroup("Available Applications");
+
+ appTable.select(TestProperties.getProperty("openshift.jbossapp.name"));
+
+ bot.buttonInGroup(IDELabel.Button.DELETE, "Available Applications")
+ .click();
+
+ bot.waitUntilWidgetAppears(Conditions
+ .waitForWidget(WidgetMatcherFactory
+ .withLabel("You're up to delete all data within an application. "
+ + "The data may not be recovered. Are you sure that you want to delete application "+TestProperties.getProperty("openshift.jbossapp.name")+"?")));
+
+ bot.button(IDELabel.Button.YES).click();
+
+ bot.waitUntil(Conditions.widgetIsEnabled(appTable));
+
+ assertFalse(appTable.containsItem(TestProperties
+ .getProperty("openshift.jbossapp.name")));
+
+ deleteJenkins();
+
+ deleteLocalGitRepo();
+ }
+
+ /*
+ * Since the JBoss tooling doesn't remove app repos, we need to delete it
+ * manually
+ */
+ private void deleteLocalGitRepo() {
+
+ String userHome = System.getProperty("user.home");
+ String defaultGitLocation = userHome + "\\git\\"
+ + TestProperties.getProperty("openshift.jbossapp.name");
+
+ log.info("Removing " + defaultGitLocation);
+
+ File gitDir = new File(defaultGitLocation);
+ if (gitDir.exists() && gitDir.isDirectory()) {
+ try {
+ doDelete(gitDir);
+ } catch (IOException e) {
+ log.error("Exception when trying to delete git repo!", e);
+ }
+ }
+
+ }
+
+ private void doDelete(File path) throws IOException {
+ if (path.isDirectory()) {
+ for (File child : path.listFiles()) {
+ doDelete(child);
+ }
+ }
+ if (!path.delete()) {
+ throw new IOException("Could not delete " + path);
+ }
+ }
+
+ private void deleteJenkins() {
+ SWTBotTable appTable = bot.tableInGroup("Available Applications");
+
+ if (appTable.containsItem("jenkins")) {
+ appTable.select("jenkins");
+
+ bot.buttonInGroup(IDELabel.Button.DELETE, "Available Applications")
+ .click();
+
+ bot.waitUntilWidgetAppears(Conditions
+ .waitForWidget(WidgetMatcherFactory
+ .withLabel("You're up to delete all data within an application. "
+ + "The data may not be recovered. Are you sure that you want to delete application jbossapp?")));
+
+ bot.button(IDELabel.Button.YES).click();
+
+ bot.waitUntil(Conditions.widgetIsEnabled(appTable));
+
+ assertFalse(appTable.containsItem("jenkins"));
+ }
+ }
+}
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DestroyDomain.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DestroyDomain.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DestroyDomain.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,24 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.jboss.tools.openshift.ui.bot.util.DomainDestroyer;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.junit.Test;
+
+public class DestroyDomain extends SWTTestExt {
+
+ /*
+ * Since there is no way how to destroy a domain from JBoss Tools, we need
+ * to use OpenShift REST API to clean the account
+ */
+ @Test
+ public void testDestroyDomain() {
+
+ int resp_code = DomainDestroyer.destroyDomain(
+ TestProperties.getProperty("openshift.domain.new"),
+ TestProperties.getProperty("openshift.user.name"),
+ TestProperties.getProperty("openshift.user.pwd"));
+
+ assertTrue("Trying to destroy domain: HTTP Response code is not 200.", resp_code == 200);
+ }
+}
Deleted: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DomainManipulation.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DomainManipulation.java 2012-01-24 10:41:53 UTC (rev 38079)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/DomainManipulation.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -1,22 +0,0 @@
-package org.jboss.tools.openshift.ui.bot.test;
-
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.junit.Test;
-
-public class DomainManipulation extends SWTTestExt {
-
- @Test
- public void domainCreated() {
-
- bot.sleep(TIME_10S);
-
-
-
- }
-
- @Test
- public void domainRenamed() {
-
- }
-
-}
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/EmbeddCartrides.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/EmbeddCartrides.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/EmbeddCartrides.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,58 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import java.util.StringTokenizer;
+
+import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+public class EmbeddCartrides extends SWTTestExt {
+
+ @Test
+ public void embeddCartriges() {
+
+ //TODO: be sure to have app selected
+
+ bot.buttonInGroup("Edit", "Available Applications").click();
+
+ // TODO: Doesn't work
+ bot.waitUntilWidgetAppears(Conditions
+ .waitForWidget(WidgetMatcherFactory
+ .withText("Embeddable Cartridges")));
+
+ StringTokenizer tokenizer = new StringTokenizer(
+ TestProperties.getProperty("openshift.jbossapp.cartridges"),
+ ";");
+
+ SWTBotTable cartridgeTable = bot.tableInGroup("Embeddable Cartridges",
+ 0);
+
+ while (tokenizer.hasMoreTokens()) {
+ String cartridge = tokenizer.nextToken();
+
+ cartridgeTable.getTableItem(cartridge).click();
+
+ if (cartridge.contains("jenkins")) {
+ bot.text(0).setText("jenkins");
+ bot.button(IDELabel.Button.OK).click();
+ bot.waitUntilWidgetAppears(Conditions
+ .waitForWidget(WidgetMatcherFactory
+ .withLabel(IDELabel.Button.OK)));
+ bot.button(IDELabel.Button.OK).click();
+ }
+
+ bot.button(IDELabel.Button.FINISH).click();
+
+ bot.waitUntilWidgetAppears(Conditions
+ .waitForWidget(WidgetMatcherFactory
+ .withLabel(IDELabel.Button.OK)));
+ bot.button(IDELabel.Button.OK).click();
+ }
+
+ }
+
+}
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ImportRepublishAppASS7.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ImportRepublishAppASS7.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/ImportRepublishAppASS7.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,63 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+public class ImportRepublishAppASS7 extends SWTTestExt {
+
+ private void finishWizardAndImportApp() {
+
+ bot.tableInGroup("Available Applications").select(
+ TestProperties.getProperty("openshift.jbossapp.name"));
+
+ bot.button(IDELabel.Button.NEXT).click();
+
+ SWTBotButton finishButton = bot.button(IDELabel.Button.FINISH);
+
+ bot.waitUntil(Conditions.widgetIsEnabled(finishButton));
+
+ finishButton.click();
+
+ // TODO: wait for new shell
+ bot.text(0).setText(TestProperties
+ .getProperty("openshift.ssh.passphrase"));
+
+ bot.waitUntil(Conditions.shellCloses(bot.activeShell()));
+
+ assertTrue("App is not in the Package Explorer!",
+ packageExplorer.existsResource(TestProperties
+ .getProperty("openshift.jbossapp.name")));
+ }
+
+ @Test
+ public void adapterIsCreated() {
+ finishWizardAndImportApp();
+
+ assertNotNull("App runtime not in the Servers View!",
+ servers.findServerByName(servers.show().bot().tree(),
+ TestProperties.getProperty("openshift.jbossapp.name")));
+ }
+
+ private void modifyApp() {
+ SWTBot wiz = open.newObject(ActionItem.NewObject.WebHTMLPage.LABEL);
+ wiz.text(1).setText("Test.html");
+ wiz.button(IDELabel.Button.FINISH);
+ }
+
+ @Test
+ public void republishApp() {
+ modifyApp();
+
+ servers.findServerByName(servers.show().bot().tree(),
+ TestProperties.getProperty("openshift.jbossapp.name"))
+ .select("Jon, Doe").contextMenu("Publish").click();
+
+ }
+
+}
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java 2012-01-24 10:41:53 UTC (rev 38079)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -1,13 +1,13 @@
- /*******************************************************************************
- * 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
- ******************************************************************************/
+/*******************************************************************************
+ * 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.openshift.ui.bot.test;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
@@ -18,23 +18,36 @@
* <b>OpenShift SWTBot TestSuite</b>
*
* <br>
- * TestSuite containing following test cases :
+ * TestSuite covers following test cases :
* <ul>
- * <li>JBDS50_XXXX User credentials validation</li>
- * <li>JBDS50_XXXX Domain is created, renamed correctly</li>
+ * <li>JBDS50_XXXX User credentials validation</li>
+ * <li></li>
+ * <li>JBDS50_XXXX Domain is created, renamed correctly</li>
+ * <li>JBDS50_XXXX App with JBossAS7 cartridge is created correctly via
+ * OpenShift wizards</li>
+ * <li>JBDS50_XXXX Embed jenkins etc. into OpenShift Express applications</li>
+ * <li>JBDS50_XXXX App with JBossAS7 cartridge can be deleted</li>
+ * <li>JBDS50_XXXX JBoss server adapter is created successfully</li>
+ * <li>JBDS50_XXXX App with JBossAS7 cartridge can be modified and republished</li>
+ * <li>JBDS50_XXXX SSH keys management</li>
* </ul>
*
* @author sbunciak
*/
-@SuiteClasses({
+@SuiteClasses({
- CredentialsValidation.class,
- DomainManipulation.class
-
- })
+CredentialsValidation.class,
+CreateDomain.class,
+SSHKeysManagment.class,
+RenameDomain.class,
+CreateAppAS7.class,
+EmbeddCartrides.class,
+ImportRepublishAppASS7.class,
+DeleteAppAS7.class,
+DestroyDomain.class
+
+})
@RunWith(RequirementAwareSuite.class)
public class OpenShiftAllBotTests {
-
- // TODO : delete test domain created in DomainManipulation
-
+ // TODO: test republishing with selenium
}
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RenameDomain.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RenameDomain.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/RenameDomain.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,30 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.jboss.tools.openshift.ui.bot.util.TestProperties;
+import org.junit.Test;
+
+public class RenameDomain extends SWTBotTestCase {
+
+ @Test
+ public void domainRename() {
+
+ SWTBotText domainText = bot.textInGroup("Domain", 0);
+
+ bot.waitUntil(Conditions.widgetIsEnabled(domainText));
+
+ assertTrue(
+ "Domain should be set correctly at this stage!",
+ domainText.getText().equals(
+ TestProperties.getProperty("openshift.domain")));
+
+ domainText.setText(TestProperties.getProperty("openshift.domain.new"));
+
+ bot.button("Rename").click();
+
+ bot.waitUntil(Conditions.widgetIsEnabled(domainText));
+ }
+
+}
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeysManagment.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeysManagment.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/SSHKeysManagment.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,31 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.junit.Test;
+
+public class SSHKeysManagment extends SWTTestExt {
+
+ @Test
+ public void addPrivateKey() {
+
+ bot.waitUntilWidgetAppears(Conditions.waitForWidget(WidgetMatcherFactory
+ .withLabel("SSH Public Key")));
+
+ bot.link(0).click("SSH2 Preferences");
+ //TODO: wait
+
+ SWTBotText privateKeysText = bot.text(2);
+
+ privateKeysText.setText(privateKeysText.getText() + ",libra_id_rsa");
+
+ bot.button("OK").click();
+
+ // TODO: repeat untilClosedActiveShell - due to HTTP 500
+
+ bot.button("Finish").click();
+ }
+
+}
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/DomainDestroyer.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,52 @@
+package org.jboss.tools.openshift.ui.bot.util;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.PostMethod;
+
+/**
+ *
+ * @author sbunciak
+ *
+ * Utility class to destroy domain on OpenShift
+ */
+public class DomainDestroyer {
+
+ /**
+ *
+ * Destroys registered domain on OpenShift Express
+ *
+ * @param domain
+ * @param login
+ * @param password
+ * @return HTTP Response code or 0 if some Exception was caught
+ */
+ public static int destroyDomain(String domain, String login, String password) {
+
+ int resp_code = 0;
+ String input = "{\"namespace\": \"" + domain + "\", \"rhlogin\": \""
+ + login + "\", \"delete\": true }";
+
+ HttpClient client = new HttpClient();
+ PostMethod method = new PostMethod(
+ "https://openshift.redhat.com/broker/domain");
+
+ method.addParameter("json_data", input);
+ method.addParameter("password", password);
+
+ try {
+ resp_code = client.executeMethod(method);
+ } catch (Exception e) {
+ System.err.println(e);
+ } finally {
+ method.releaseConnection();
+ }
+ return resp_code;
+ }
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ destroyDomain("rhtestdomain", "sbunciak", "rhtest123");
+ }
+}
Deleted: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftTestProperties.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftTestProperties.java 2012-01-24 10:41:53 UTC (rev 38079)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftTestProperties.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -1,40 +0,0 @@
-package org.jboss.tools.openshift.ui.bot.util;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.apache.log4j.Logger;
-
-/**
- * Just static properties holder
- *
- * @author sbunciak
- *
- */
-public class OpenShiftTestProperties {
-
- public static Properties props = new Properties();
-
- static {
-
- try {
- props.load(new FileInputStream(
- "resources/openshift.ui.bot.test.properties"));
-
- } catch (FileNotFoundException e) {
- Logger.getLogger(OpenShiftTestProperties.class).error(
- "Property file not found !", e);
- } catch (IOException e) {
- Logger.getLogger(OpenShiftTestProperties.class).error(
- "IO Exception !", e);
- }
-
- }
-
- public static String getProperty(String key) {
- return props.getProperty(key);
- }
-
-}
Copied: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/TestProperties.java (from rev 36826, trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftTestProperties.java)
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/TestProperties.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/TestProperties.java 2012-01-24 10:42:01 UTC (rev 38080)
@@ -0,0 +1,40 @@
+package org.jboss.tools.openshift.ui.bot.util;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Just static properties holder
+ *
+ * @author sbunciak
+ *
+ */
+public class TestProperties {
+
+ public static Properties props = new Properties();
+
+ static {
+
+ try {
+ props.load(new FileInputStream(
+ "resources/openshift.ui.bot.test.properties"));
+
+ } catch (FileNotFoundException e) {
+ Logger.getLogger(TestProperties.class).error(
+ "Property file not found !", e);
+ } catch (IOException e) {
+ Logger.getLogger(TestProperties.class).error(
+ "IO Exception !", e);
+ }
+
+ }
+
+ public static String getProperty(String key) {
+ return props.getProperty(key);
+ }
+
+}
12 years, 11 months
JBoss Tools SVN: r38079 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-24 05:41:53 -0500 (Tue, 24 Jan 2012)
New Revision: 38079
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java
Log:
CDIConstants added
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java 2012-01-24 10:41:53 UTC (rev 38079)
@@ -0,0 +1,45 @@
+package org.jboss.tools.cdi.bot.test;
+
+public class CDIConstants {
+
+ public static final String CLASS_OPEN_TAG = "<class>";
+ public static final String CLASS_END_TAG = "</class>";
+ public static final String STEREOTYPE_OPEN_TAG = "<stereotype>";
+ public static final String STEREOTYPE_END_TAG = "</stereotype>";
+ public static final String JAVA_RESOURCES = "Java Resources";
+ public static final String JAVA_SOURCE = "JavaSource";
+ public static final String SRC = "src";
+ public static final String JAVA_RESOURCES_SRC_FOLDER = JAVA_RESOURCES + "/" + SRC + "/";
+ public static final String META_INF = "META-INF";
+ public static final String WEB_INF = "WEB-INF";
+ public static final String WEBCONTENT = "WebContent";
+ public static final String BEANS_XML = "beans.xml";
+ public static final String META_INF_BEANS_XML_PATH = WEBCONTENT + "/" + META_INF + "/" + BEANS_XML;
+ public static final String WEB_INF_BEANS_XML_PATH = WEBCONTENT + "/" + WEB_INF + "/" + BEANS_XML;
+ public static final String NAVIGATE = "Navigate";
+ public static final String REFRESH = "Refresh";
+ public static final String OPEN_CDI_NAMED_BEANS = "Open CDI Named Bean";
+ public static final String SHOW_ALL_ASSIGNABLE = "Show All Assignable Beans...";
+ public static final String CDI_WEB_PROJECT = "CDI Web Project";
+ public static final String CDI_GROUP = "CDI (Context and Dependency Injection)";
+ public static final String WEB_GROUP = "Web";
+ public static final String DYNAMIC_WEB_PROJECT = "Dynamic Web Project";
+ public static final String CONFIGURE = "Configure";
+ public static final String ADD_CDI_SUPPORT = "Add CDI (Context and Dependency Injection) support...";
+ public static final String WINDOW = "Window";
+ public static final String PROPERTIES = "Properties";
+ public static final String PREFERENCES = "Preferences";
+ public static final String CDI_PROPERTIES_SETTINGS = "CDI (Context and Dependency Injection) Settings";
+ public static final String JAVA_BUILD_PATH = "Java Build Path";
+ public static final String LIBRARIES = "Libraries";
+ public static final String ADD_JARS = "Add JARs...";
+ public static final String OPEN_HYPERLINK = "Open Hyperlink";
+ public static final String QUICK_FIX = "Quick Fix";
+ public static final String CDI_PRESET = "Dynamic Web Project " +
+ "with CDI (Context and Dependency Injection)";
+ public static final String CDI_FACET = "CDI (Contexts and Dependency Injection)";
+ public static final String CONFIGURATION = "Configuration";
+ public static final String PROJECT_FACETS = "Project Facets";
+ public static String LINE_SEPARATOR = System.getProperty("line.separator");
+
+}
12 years, 11 months
JBoss Tools SVN: r38078 - in trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib: connector and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-01-24 05:13:50 -0500 (Tue, 24 Jan 2012)
New Revision: 38078
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/cfg/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/hsqldb.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/mysql-connector-java-5.1.13-bin.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/postgresql-8.4-702.jdbc4.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/antlr-2.7.6.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/commons-collections-3.1.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/dom4j-1.6.1.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/hibernate3.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/javassist-3.9.0.GA.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/jta-1.1.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/slf4j-api-1.5.8.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/antlr-2.7.7.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/commons-collections-3.2.1.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/dom4j-1.6.1.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-commons-annotations-4.0.1.Final.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-core-4.0.1.Final.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-entitymanager-4.0.1.Final.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-envers-4.0.1.Final.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-jpa-2.0-api-1.0.1.Final.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/javassist-3.15.0-GA.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/jboss-logging-3.1.0.CR2.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/jboss-transaction-api_1.1_spec-1.0.0.Final.jar
Log:
[hbbot] hibernate libs libs for test update
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/hsqldb.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/hsqldb.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/mysql-connector-java-5.1.13-bin.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/mysql-connector-java-5.1.13-bin.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/postgresql-8.4-702.jdbc4.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/postgresql-8.4-702.jdbc4.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/antlr-2.7.6.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/antlr-2.7.6.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/commons-collections-3.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/commons-collections-3.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/dom4j-1.6.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/dom4j-1.6.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/hibernate3.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/hibernate3.jar
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/javassist-3.9.0.GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/javassist-3.9.0.GA.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/jta-1.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/jta-1.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/slf4j-api-1.5.8.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/slf4j-api-1.5.8.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/antlr-2.7.7.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/antlr-2.7.7.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/commons-collections-3.2.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/commons-collections-3.2.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/dom4j-1.6.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/dom4j-1.6.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-commons-annotations-4.0.1.Final.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-commons-annotations-4.0.1.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-core-4.0.1.Final.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-core-4.0.1.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-entitymanager-4.0.1.Final.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-entitymanager-4.0.1.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-envers-4.0.1.Final.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-envers-4.0.1.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-jpa-2.0-api-1.0.1.Final.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/hibernate-jpa-2.0-api-1.0.1.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/javassist-3.15.0-GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/javassist-3.15.0-GA.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/jboss-logging-3.1.0.CR2.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/jboss-logging-3.1.0.CR2.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/jboss-transaction-api_1.1_spec-1.0.0.Final.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/jboss-transaction-api_1.1_spec-1.0.0.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
12 years, 11 months
JBoss Tools SVN: r38077 - trunk/as/features/org.jboss.ide.eclipse.as.source.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-01-24 05:13:29 -0500 (Tue, 24 Jan 2012)
New Revision: 38077
Modified:
trunk/as/features/org.jboss.ide.eclipse.as.source.feature/feature.xml
Log:
fix for build error in as source feature
Modified: trunk/as/features/org.jboss.ide.eclipse.as.source.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipse.as.source.feature/feature.xml 2012-01-24 10:04:26 UTC (rev 38076)
+++ trunk/as/features/org.jboss.ide.eclipse.as.source.feature/feature.xml 2012-01-24 10:13:29 UTC (rev 38077)
@@ -25,7 +25,7 @@
<plugin id="org.jboss.ide.eclipse.as.core.source" download-size="0" install-size="0" version="0.0.0" unpack="false" />
<plugin id="org.jboss.ide.eclipse.as.doc.user.source" download-size="0" install-size="0" version="0.0.0" unpack="false" />
<plugin id="org.jboss.ide.eclipse.as.jmx.integration.source" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin id="org.jboss.ide.eclipse.as.management.as7.source" download-size="0" install-size="0" version="0.0.0" unpack="false" />
+ <plugin id="org.jboss.ide.eclipse.as.management.as71.source" download-size="0" install-size="0" version="0.0.0" unpack="false" />
<plugin id="org.jboss.ide.eclipse.as.rse.core.source" download-size="0" install-size="0" version="0.0.0" unpack="false" />
<plugin id="org.jboss.ide.eclipse.as.rse.ui.source" download-size="0" install-size="0" version="0.0.0" unpack="false" />
<plugin id="org.jboss.ide.eclipse.as.ui.source" download-size="0" install-size="0" version="0.0.0" unpack="false" />
12 years, 11 months
JBoss Tools SVN: r38076 - in trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj: hibernatelib and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-01-24 05:04:26 -0500 (Tue, 24 Jan 2012)
New Revision: 38076
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/.project
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/connector/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate35/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/antlr-2.7.6.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/commons-collections-3.1.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/dom4j-1.6.1.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/hibernate3.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/javassist-3.12.0.GA.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/jta-1.1.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/slf4j-api-1.6.1.jar
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate40/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/jpa2/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/jpa2/javax.persistence_2.0.0.jar
Removed:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate35.zip
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate36.zip
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate40.zip
Log:
[hbbot] remove lib zip files and upadte libs to more flexible way
Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate35.zip
===================================================================
(Binary files differ)
Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate36.zip
===================================================================
(Binary files differ)
Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate40.zip
===================================================================
(Binary files differ)
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/.project
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/.project (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/.project 2012-01-24 10:04:26 UTC (rev 38076)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>hibernatelib</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/antlr-2.7.6.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/antlr-2.7.6.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/commons-collections-3.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/commons-collections-3.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/dom4j-1.6.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/dom4j-1.6.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/hibernate3.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/hibernate3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/javassist-3.12.0.GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/javassist-3.12.0.GA.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/jta-1.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/jta-1.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/slf4j-api-1.6.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/hibernate36/slf4j-api-1.6.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/jpa2/javax.persistence_2.0.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernatelib/jpa2/javax.persistence_2.0.0.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
12 years, 11 months
JBoss Tools SVN: r38075 - in workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite: features and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-01-24 05:01:37 -0500 (Tue, 24 Jan 2012)
New Revision: 38075
Added:
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.1.201201241100.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.1.201201241100.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.1.201201241100.jar
Removed:
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.1.201201232234.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.1.201201232234.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.1.201201232234.jar
Modified:
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/artifacts.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/content.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml
Log:
JBIDE-9309 Easily adding full JBoss AS source
Modified: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/artifacts.jar
===================================================================
(Binary files differ)
Modified: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/content.jar
===================================================================
(Binary files differ)
Deleted: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.1.201201232234.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.1.201201241100.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.1.201201241100.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.1.201201232234.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.1.201201241100.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.1.201201241100.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.1.201201232234.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.1.201201241100.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.1.201201241100.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml
===================================================================
--- workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml 2012-01-24 09:34:20 UTC (rev 38074)
+++ workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml 2012-01-24 10:01:37 UTC (rev 38075)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/org.jboss.tools.as.sourcelookup.feature_1.0.1.201201232234.jar" id="org.jboss.tools.as.sourcelookup.feature" version="1.0.1.201201232234">
+ <feature url="features/org.jboss.tools.as.sourcelookup.feature_1.0.1.201201241100.jar" id="org.jboss.tools.as.sourcelookup.feature" version="1.0.1.201201241100">
<category name="org.jboss.tools.as.sourcelookup"/>
</feature>
<category-def name="org.jboss.tools.as.sourcelookup" label="JBoss Tools Source Lookup"/>
12 years, 11 months