JBoss Tools SVN: r39709 - branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-21 10:53:37 -0400 (Wed, 21 Mar 2012)
New Revision: 39709
Modified:
branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
Log:
[JBIDE-11240] making sure selecting application by name and by instance behaves the same
Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-03-21 14:48:53 UTC (rev 39708)
+++ branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-03-21 14:53:37 UTC (rev 39709)
@@ -20,6 +20,7 @@
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.ICartridge;
@@ -48,7 +49,7 @@
// start with a null value as a marker of non-initialized state (used during
// first pass validation)
- private List<IApplication> existingApplications = null;
+ private List<IApplication> existingApplications = new ArrayList<IApplication>();
private List<ICartridge> cartridges = new ArrayList<ICartridge>();
private List<IEmbeddableCartridge> embeddableCartridges = new ArrayList<IEmbeddableCartridge>();
private String existingApplicationName;
@@ -111,21 +112,24 @@
return existingApplicationName;
}
+ /**
+ * Sets the existing application in this model by name. If there's an
+ * existing application with the given name, all properties related to an
+ * existing application are also set.
+ *
+ * @param applicationName
+ * @throws OpenShiftException
+ *
+ * @see #doSetExistingApplication(IApplication)
+ */
public void setExistingApplicationName(String applicationName) throws OpenShiftException {
firePropertyChange(PROPERTY_EXISTING_APPLICATION_NAME
- , existingApplicationName
- , this.existingApplicationName = applicationName);
- if (applicationName != null) {
- for (IApplication application : getApplications()) {
- if (application.getName().equals(applicationName)) {
- setApplicationName(application.getName());
- setSelectedCartridge(application.getCartridge());
- setSelectedEmbeddableCartridges(new HashSet<IEmbeddableCartridge>(
- application.getEmbeddedCartridges()));
- }
- }
+ , this.existingApplicationName, this.existingApplicationName = applicationName);
+
+ if (!StringUtils.isEmpty(applicationName)
+ && isExistingApplication(applicationName)) {
+ doSetExistingApplication(getExistingApplication(applicationName));
}
-
}
public void loadExistingApplications() throws OpenShiftException {
@@ -146,15 +150,19 @@
return existingApplicationsLoaded;
}
- public boolean isExistingApplication(String applicationName) {
+ public IApplication getExistingApplication(String applicationName) {
for (IApplication application : getExistingApplications()) {
if (application.getName().equalsIgnoreCase(applicationName)) {
- return true;
+ return application;
}
}
- return false;
+ return null;
}
+ public boolean isExistingApplication(String applicationName) {
+ return getExistingApplication(applicationName) != null;
+ }
+
/**
* @param existingApplications
* the existingApplications to set
@@ -215,9 +223,40 @@
return cartridges;
}
+ /**
+ * Sets the properties in this model that are related to an existing
+ * application. The name of the existing application is set!.
+ *
+ * @param application
+ * @throws OpenShiftException
+ *
+ * @see #setExistingApplicationName(String)
+ * @see #setApplicationName(IApplication)
+ * @see #setSelectedCartridge(IApplication)
+ * @see #setSelectedEmbeddableCartridges(Set)
+ * @see #wizardModel#setApplication
+ */
public void setExistingApplication(IApplication application) throws OpenShiftException {
- if(application != null) {
+ if (application != null) {
setExistingApplicationName(application.getName());
+ doSetExistingApplication(application);
+ }
+ }
+
+ /**
+ * Sets the properties in this model that are related to an existing
+ * application. It does not set the name of the existing application!.
+ *
+ * @param application
+ * @throws OpenShiftException
+ *
+ * @see #setApplicationName(IApplication)
+ * @see #setSelectedCartridge(IApplication)
+ * @see #setSelectedEmbeddableCartridges(Set)
+ * @see #wizardModel#setApplication
+ */
+ protected void doSetExistingApplication(IApplication application) throws OpenShiftException {
+ if (application != null) {
setApplicationName(application.getName());
setSelectedCartridge(application.getCartridge());
setSelectedEmbeddableCartridges(new HashSet<IEmbeddableCartridge>(application.getEmbeddedCartridges()));
@@ -225,6 +264,7 @@
}
}
+
public void resetExistingApplication() throws OpenShiftException {
setExistingApplication(null);
}
12 years, 3 months
JBoss Tools SVN: r39708 - in trunk/requirements: JBoss-Portal-2.7.2.GA and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-03-21 10:48:53 -0400 (Wed, 21 Mar 2012)
New Revision: 39708
Added:
trunk/requirements/JBoss-Portal-2.7.2.GA/
trunk/requirements/JBoss-Portal-2.7.2.GA/build.properties
Log:
Added configuration for JBoss Portal
Added: trunk/requirements/JBoss-Portal-2.7.2.GA/build.properties
===================================================================
--- trunk/requirements/JBoss-Portal-2.7.2.GA/build.properties (rev 0)
+++ trunk/requirements/JBoss-Portal-2.7.2.GA/build.properties 2012-03-21 14:48:53 UTC (rev 39708)
@@ -0,0 +1,3 @@
+build.uri=http://sourceforge.net/projects/jboss/files/JBoss%20Portal/JBoss-Portal-2.7.2.GA/
+build.archive=jboss-portal-2.7.2-bundled.zip
+md5=83aa628f5451f47ebce4845d8799144e
\ No newline at end of file
12 years, 3 months
JBoss Tools SVN: r39707 - in trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test: resources/project_config_files and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-03-21 10:43:42 -0400 (Wed, 21 Mar 2012)
New Revision: 39707
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/project_config_files/jboss-portal.properties
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/requirements.properties
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/project_config_files/gatein-3.1.0.properties
Log:
Added configuration for JBoss Portal
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-03-21 14:08:39 UTC (rev 39706)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-03-21 14:43:42 UTC (rev 39707)
@@ -14,9 +14,12 @@
<properties>
<jbosstools.test.jboss-gatein.home>${requirement.build.root}/GateIn-3.1.0-GA</jbosstools.test.jboss-gatein.home>
- <jbosstools.test.jboss-seam.home>${requirement.build.root}/jboss-seam-2.2.1.CR2</jbosstools.test.jboss-seam.home> <!--TODO setup default path -->
+ <jbosstools.test.jboss-seam-2.2.home>${requirement.build.root}/jboss-seam-2.2.1.Final</jbosstools.test.jboss-seam-2.2.home>
+ <jbosstools.test.jboss-portal.home>${requirement.build.root}/jboss-portal-2.7.2</jbosstools.test.jboss-portal.home>
+ <jbosstools.test.jboss-seam-2.0.home>${requirement.build.root}/jboss-seam-2.0.1.GA</jbosstools.test.jboss-seam-2.0.home>
+ <!--TODO setup default path -->
<configurations.dir>resources/project_config_files</configurations.dir>
- <systemProperties>-Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam.home=${jbosstools.test.jboss-seam.home} -Dtest.configurations.dir=${configurations.dir} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
+ <systemProperties>-Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam-2.2.home=${jbosstools.test.jboss-seam-2.2.home} -Djbosstools.test.jboss-portal.home=${jbosstools.test.jboss-portal.home} -Djbosstools.test.jboss-seam-2.0.home=${jbosstools.test.jboss-seam-2.0.home} -Dtest.configurations.dir=${configurations.dir} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
<test.class>org.jboss.tools.portlet.ui.bot.test.AllTestsSuite</test.class>
</properties>
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/requirements.properties
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/requirements.properties 2012-03-21 14:08:39 UTC (rev 39706)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/requirements.properties 2012-03-21 14:43:42 UTC (rev 39707)
@@ -1 +1 @@
-requirements=gatein-3.1.0.Final,seam-2.2.1.CR2
\ No newline at end of file
+requirements=gatein-3.1.0.Final,seam-2.2.1.Final,JBoss-Portal-2.7.2.GA,seam-2.0.1.GA
\ No newline at end of file
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/project_config_files/gatein-3.1.0.properties
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/project_config_files/gatein-3.1.0.properties 2012-03-21 14:08:39 UTC (rev 39706)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/project_config_files/gatein-3.1.0.properties 2012-03-21 14:43:42 UTC (rev 39707)
@@ -1,4 +1,4 @@
SERVER=EPP,5.1.0,default,${jbosstools.test.jboss-gatein.home}
-SEAM=2.2,${jbosstools.test.jboss-seam.home}
+SEAM=2.2,${jbosstools.test.jboss-seam-2.2.home}
DB=hsqldb18,internal, , , , ,
PORTLET_BRIDGE=${jbosstools.test.jboss-gatein.home}/server/default/deploy/gatein.ear/lib/
\ No newline at end of file
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/project_config_files/jboss-portal.properties
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/project_config_files/jboss-portal.properties (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/project_config_files/jboss-portal.properties 2012-03-21 14:43:42 UTC (rev 39707)
@@ -0,0 +1,4 @@
+SERVER=EPP,4.3,default,${jbosstools.test.jboss-portal.home}
+SEAM=2.0,${jbosstools.test.jboss-seam-2.0.home}
+DB=hsqldb18,internal, , , , ,
+PORTLET_BRIDGE=${jbosstools.test.jboss-portal.home}/jboss-as/server/default/deploy/jboss-portal.sar/portal-identity.sar/portal-identity.war/WEB-INF/lib
\ No newline at end of file
12 years, 3 months
JBoss Tools SVN: r39706 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-21 10:08:39 -0400 (Wed, 21 Mar 2012)
New Revision: 39706
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java
Log:
VetoAnnotationTest implementation finished
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java 2012-03-21 14:06:59 UTC (rev 39705)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java 2012-03-21 14:08:39 UTC (rev 39706)
@@ -16,7 +16,6 @@
import org.jboss.tools.cdi.bot.test.annotations.ProblemsType;
import org.jboss.tools.cdi.seam3.bot.test.base.SolderTestBase;
import org.jboss.tools.cdi.seam3.bot.test.util.SeamLibraries;
-import org.junit.Ignore;
import org.junit.Test;
public class VetoAnnotationTest extends SolderTestBase {
@@ -38,7 +37,6 @@
}
-
@Test
public void testManagedBeans() {
@@ -130,23 +128,33 @@
true, "manager");
}
- @Ignore
+
@Test
public void testObserverMethods() {
+ String vetoBean = "Bean";
+ String projectName = "veto5";
+ String eventAttribute = "eventAttribute";
+ importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
- }
- /*@Ignore
- @Test
- public void testDecorator() {
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", APPLICATION_CLASS).toTextEditor());
+ assertFalse(openOnUtil.openOnByOption(eventAttribute, APPLICATION_CLASS,
+ CDIConstants.OPEN_CDI_OBSERVER_METHOD));
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", vetoBean + ".java").toTextEditor());
+ editResourceUtil.replaceInEditor("@Veto", "");
+ editResourceUtil.replaceInEditor("import org.jboss.seam.solder.core.Veto;", "");
+
+ assertTrue(openOnUtil.openOnByOption(eventAttribute, APPLICATION_CLASS,
+ CDIConstants.OPEN_CDI_OBSERVER_METHOD));
+ assertTrue(getEd().getTitle().equals(vetoBean + ".java"));
+ assertTrue(getEd().getSelection().equals("method"));
+
}
- @Ignore
- @Test
- public void testInterceptor() {
-
- }*/
private void testVetoAnnotationImproperValue(String projectName) {
12 years, 3 months
JBoss Tools SVN: r39705 - 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-03-21 10:06:59 -0400 (Wed, 21 Mar 2012)
New Revision: 39705
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java
Log:
Add constant for Open CDI Observer option
Modified: 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 2012-03-21 14:04:05 UTC (rev 39704)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIConstants.java 2012-03-21 14:06:59 UTC (rev 39705)
@@ -21,6 +21,7 @@
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 OPEN_INJECT_BEAN = "Open @Inject Bean";
+ public static final String OPEN_CDI_OBSERVER_METHOD= "Open CDI Observer Method";
public static final String CDI_WEB_PROJECT = "CDI Web Project";
public static final String MULTIPLE_BEANS = "Multiple beans are eligible for injection";
public static final String NO_BEAN_IS_ELIGIBLE = "No bean is eligible for injection to " +
12 years, 3 months
JBoss Tools SVN: r39704 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-21 10:04:05 -0400 (Wed, 21 Mar 2012)
New Revision: 39704
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Application.java
Log:
Change of event attribute name in one resource project for veto annotation bot test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Application.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Application.java 2012-03-21 13:54:32 UTC (rev 39703)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Application.java 2012-03-21 14:04:05 UTC (rev 39704)
@@ -6,6 +6,6 @@
public class Application {
@Inject @Q1
- Event<Bean> event;
+ Event<Bean> eventAttribute;
}
12 years, 3 months
JBoss Tools SVN: r39703 - in trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects: veto5 and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-21 09:54:32 -0400 (Wed, 21 Mar 2012)
New Revision: 39703
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.project
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/.jsdtscope
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.common.component
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/WebContent/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/WebContent/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/WebContent/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/WebContent/WEB-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/WebContent/WEB-INF/lib/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/build/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Application.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Bean.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Q1.java
Log:
new resource for veto annotation bot test
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.classpath (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.classpath 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/AS-7.0">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.project (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.project 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>veto5</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ </natures>
+</projectDescription>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/.jsdtscope
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/.jsdtscope (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/.jsdtscope 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.jdt.core.prefs 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.common.component 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="veto5">
+ <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="veto5"/>
+ <property name="java-output-path" value="/veto5/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.common.project.facet.core.xml 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="AS-7.0"/>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="jst.web"/>
+ <fixed facet="java"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.jsdt.ui.superType.container 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.wst.jsdt.ui.superType.name 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/WebContent/META-INF/MANIFEST.MF 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Application.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Application.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Application.java 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,11 @@
+package cdi.seam;
+
+import javax.enterprise.event.Event;
+import javax.inject.Inject;
+
+public class Application {
+
+ @Inject @Q1
+ Event<Bean> event;
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Bean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Bean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Bean.java 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,14 @@
+package cdi.seam;
+
+import javax.enterprise.event.Observes;
+
+import org.jboss.seam.solder.core.Veto;
+
+@Veto
+public class Bean {
+
+ public void method(@Observes @Q1 Bean event) {
+
+ }
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Q1.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Q1.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/src/cdi/seam/Q1.java 2012-03-21 13:54:32 UTC (rev 39703)
@@ -0,0 +1,21 @@
+package cdi.seam;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Q1 {
+
+}
12 years, 3 months
JBoss Tools SVN: r39702 - trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-03-21 09:30:29 -0400 (Wed, 21 Mar 2012)
New Revision: 39702
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/HibernateSuite.java
Log:
New hibernate tests added into Hibernate bot test suite
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/HibernateSuite.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/HibernateSuite.java 2012-03-21 13:28:24 UTC (rev 39701)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/HibernateSuite.java 2012-03-21 13:30:29 UTC (rev 39702)
@@ -14,6 +14,8 @@
import org.jboss.tools.hb.ui.bot.test.mappingfile.EditMappingFileTest;
import org.jboss.tools.hb.ui.bot.test.perspective.JPAPerspectiveTest;
import org.jboss.tools.hb.ui.bot.test.perspective.PerspectiveTest;
+import org.jboss.tools.hb.ui.bot.test.validation.AnnotationValidationTest;
+import org.jboss.tools.hb.ui.bot.test.view.JPADetailViewTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -41,6 +43,10 @@
/* perspective */
JPAPerspectiveTest.class,
PerspectiveTest.class,
+ /* validation */
+ AnnotationValidationTest.class,
+ /* view */
+ JPADetailViewTest.class
})
public class HibernateSuite {
12 years, 3 months
JBoss Tools SVN: r39701 - in trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test: resources/prj/jpatest40/src/org and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-03-21 09:28:24 -0400 (Wed, 21 Mar 2012)
New Revision: 39701
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/View.launch
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/Machine.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ViewSuite.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/JPADetailViewTest.java
Log:
HB bot ui initial skeleton of JPADetailView test added
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/View.launch
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/View.launch (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/View.launch 2012-03-21 13:28:24 UTC (rev 39701)
@@ -0,0 +1,43 @@
+<?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.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ViewSuite.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.MAIN_TYPE" value="org.jboss.tools.hb.ui.bot.suite.ViewSuite"/>
+<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.hibernate.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 -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M -Dusage_reporting_enabled=false -Dtest.configurations.dir=/home/jpeterka/etc/hb"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<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>
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/View.launch
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/Machine.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/Machine.java (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/Machine.java 2012-03-21 13:28:24 UTC (rev 39701)
@@ -0,0 +1,21 @@
+package org.jpadetails;
+
+import java.io.Serializable;
+import javax.persistence.*;
+
+import org.hibernate.annotations.NamedNativeQuery;
+
+/**
+ * Entity implementation class for Entity: Dog
+ *
+ */
+@Entity
+@NamedNativeQuery(name = "query ", query = "SELECT * FROM MACHINE")
+public class Machine implements Serializable {
+
+ @Id
+ long id;
+
+ private static final long serialVersionUID = 1L;
+
+}
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/Machine.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ViewSuite.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ViewSuite.java (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ViewSuite.java 2012-03-21 13:28:24 UTC (rev 39701)
@@ -0,0 +1,12 @@
+package org.jboss.tools.hb.ui.bot.suite;
+
+import org.jboss.tools.hb.ui.bot.test.view.JPADetailViewTest;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+(a)RunWith(RequirementAwareSuite.class)
+(a)SuiteClasses({JPADetailViewTest.class})
+public class ViewSuite {
+
+}
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/ViewSuite.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/JPADetailViewTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/JPADetailViewTest.java (rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/JPADetailViewTest.java 2012-03-21 13:28:24 UTC (rev 39701)
@@ -0,0 +1,62 @@
+package org.jboss.tools.hb.ui.bot.test.view;
+
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withLabel;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.waitForWidget;
+
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.jboss.tools.hb.ui.bot.common.ProjectExplorer;
+import org.jboss.tools.hb.ui.bot.test.HibernateBaseTest;
+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.helper.StringHelper;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotTwistie;
+import org.junit.Test;
+
+/**
+ * JPA View ui bot test
+ *
+ * @author jpeterka
+ *
+ */
+@Require(clearProjects = false, perspective = "Hibernate")
+public class JPADetailViewTest extends HibernateBaseTest {
+
+
+ final String prj = "jpatest40";
+ final String pkg = "org.jpadetails";
+ final String entity = "Machine.java";
+
+ @Test
+ public void jpaDetailsViewTest() {
+ importTestProject("/resources/prj/hibernatelib");
+ importTestProject("/resources/prj/jpatest40");
+
+ checkGenericGeneratorValidation();
+ }
+
+ private void checkGenericGeneratorValidation() {
+
+ SWTBotView jd = open.viewOpen(ActionItem.View.JPAJPADetails.LABEL);
+ ProjectExplorer.open(prj, "src", pkg, entity);
+ jd.show();
+
+ SWTBotEditor editor = bot.editorByTitle(entity);
+ StringHelper sh = new StringHelper(editor.toTextEditor().getText());
+ String str = "@Entity";
+ Point pos = sh.getPositionBefore(str);
+ editor.setFocus();
+ editor.toTextEditor().selectRange(pos.y, pos.x, 0);
+
+ String label = "Details are not available for the current selection.";
+ jd.bot().waitWhile(waitForWidget(withLabel(label)));
+
+ bot.sleep(TIME_5S);
+ SWTBotTwistie twistieBot = bot.twistieByLabel("Entity");
+ while (!twistieBot.isExpanded()) {
+ twistieBot.toggle();
+ }
+
+ }
+}
Property changes on: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/JPADetailViewTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 3 months
JBoss Tools SVN: r39700 - in trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test: tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-21 09:15:04 -0400 (Wed, 21 Mar 2012)
New Revision: 39700
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/DefaultBeansTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/ExactAnnotationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java
Log:
Small modifications to Annotations based bot tests and SolderTestBase
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java 2012-03-21 13:14:10 UTC (rev 39699)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java 2012-03-21 13:15:04 UTC (rev 39700)
@@ -6,8 +6,13 @@
@Override
public void prepareWorkspace() {
- projectImportHelper.importTestProject("/resources/projects/" + getProjectName(), getProjectName());
- addAndCheckLibraryInProject(getProjectName(), SeamLibraries.SOLDER);
+ importProjectWithLibrary(getProjectName(), SeamLibraries.SOLDER);
}
+ public void importProjectWithLibrary(String projectName, SeamLibraries library) {
+ projectImportHelper.importTestProject("/resources/projects/" + projectName, projectName);
+ addAndCheckLibraryInProject(projectName, library);
+ eclipse.cleanAllProjects();
+ }
+
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/DefaultBeansTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/DefaultBeansTest.java 2012-03-21 13:14:10 UTC (rev 39699)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/DefaultBeansTest.java 2012-03-21 13:15:04 UTC (rev 39700)
@@ -38,7 +38,7 @@
"cdi.seam", className);
assertFalse(openOnUtil.openOnByOption("managerImpl", className, CDIConstants.SHOW_ALL_ASSIGNABLE));
- openOnUtil.openOnByOption("managerImpl", className, "Open @Inject Bean");
+ openOnUtil.openOnByOption("managerImpl", className, CDIConstants.OPEN_INJECT_BEAN);
String destinationFile = getEd().getTitle();
assertTrue("ERROR: redirected to " + destinationFile,
destinationFile.equals("DefaultOne.java"));
@@ -68,7 +68,7 @@
assertTrue(allBeans.rowCount() == 1);
assertTrue(allBeans.getTableItem(0).getText().contains("DefaultOne"));
- openOnUtil.openOnByOption("managerImpl", className, "Open @Inject Bean");
+ openOnUtil.openOnByOption("managerImpl", className, CDIConstants.OPEN_INJECT_BEAN);
String destinationFile = getEd().getTitle();
assertTrue("ERROR: redirected to " + destinationFile,
destinationFile.equals("DefaultOne.java"));
@@ -98,7 +98,7 @@
assertTrue(allBeans.rowCount() == 1);
assertTrue(allBeans.getTableItem(0).getText().contains("ManagerImpl"));
- openOnUtil.openOnByOption("managerImpl", className, "Open @Inject Bean");
+ openOnUtil.openOnByOption("managerImpl", className, CDIConstants.OPEN_INJECT_BEAN);
String destinationFile = getEd().getTitle();
assertTrue("ERROR: redirected to " + destinationFile,
destinationFile.equals("ManagerImpl.java"));
@@ -131,7 +131,7 @@
assertTrue(allBeans.rowCount() == 1);
assertTrue(allBeans.getTableItem(0).getText().contains("ManagerImpl"));
- openOnUtil.openOnByOption("managerImpl", className, "Open @Inject Bean");
+ openOnUtil.openOnByOption("managerImpl", className, CDIConstants.OPEN_INJECT_BEAN);
String destinationFile = getEd().getTitle();
assertTrue("ERROR: redirected to " + destinationFile,
destinationFile.equals("ManagerImpl.java"));
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/ExactAnnotationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/ExactAnnotationTest.java 2012-03-21 13:14:10 UTC (rev 39699)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/ExactAnnotationTest.java 2012-03-21 13:15:04 UTC (rev 39700)
@@ -16,8 +16,6 @@
import org.jboss.tools.cdi.bot.test.annotations.ProblemsType;
import org.jboss.tools.cdi.seam3.bot.test.base.SolderTestBase;
import org.jboss.tools.cdi.seam3.bot.test.util.SeamLibraries;
-import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
-import org.jboss.tools.ui.bot.ext.types.ViewType;
import org.junit.Test;
public class ExactAnnotationTest extends SolderTestBase {
@@ -26,7 +24,6 @@
private final String EXACT_INTERFACE = "exact-interface";
private final String EXACT_BEANS = "exact-beans";
- private final String MULTIPLE_BEANS = "Multiple beans are eligible for injection";
@Override
public String getProjectName() {
@@ -63,9 +60,7 @@
String peopleManager = "PeopleManager";
String otherManager = "OtherManager";
- projectImportHelper.importTestProject("/resources/projects/" + projectName,
- projectName);
- addAndCheckLibraryInProject(projectName, SeamLibraries.SOLDER);
+ importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
"cdi.seam", className).toTextEditor());
@@ -85,20 +80,18 @@
private void testExactImproperValue(String projectName) {
- SWTEclipseExt.showView(bot,ViewType.PROBLEMS);
SWTBotTreeItem[] validationProblems = quickFixHelper.getProblems(ProblemsType.WARNINGS, projectName);
assertTrue(validationProblems.length > 0);
assertTrue(validationProblems.length == 1);
- assertContains(MULTIPLE_BEANS, validationProblems[0].getText());
+ assertContains(CDIConstants.MULTIPLE_BEANS, validationProblems[0].getText());
}
private void testExactProperValue(String projectName, String value) {
- SWTEclipseExt.showView(bot,ViewType.PROBLEMS);
SWTBotTreeItem[] validationProblems = quickFixHelper.getProblems(ProblemsType.WARNINGS, projectName);
assertTrue(validationProblems.length == 0);
- assertTrue(openOnUtil.openOnByOption(value + ".class", className, "Open @Inject Bean"));
+ assertTrue(openOnUtil.openOnByOption(value + ".class", className, CDIConstants.OPEN_INJECT_BEAN));
assertTrue(getEd().getTitle().equals(value + ".java"));
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java 2012-03-21 13:14:10 UTC (rev 39699)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java 2012-03-21 13:15:04 UTC (rev 39700)
@@ -11,54 +11,163 @@
package org.jboss.tools.cdi.seam3.bot.test.tests;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
+import org.jboss.tools.cdi.bot.test.annotations.ProblemsType;
import org.jboss.tools.cdi.seam3.bot.test.base.SolderTestBase;
+import org.jboss.tools.cdi.seam3.bot.test.util.SeamLibraries;
+import org.junit.Ignore;
import org.junit.Test;
public class VetoAnnotationTest extends SolderTestBase {
+ private String APPLICATION_CLASS = "Application.java";
+
@Override
public String getProjectName() {
- return "veto";
+ return "veto1";
}
@Override
public void waitForJobs() {
-
+ projectExplorer.deleteAllProjects();
}
- @Test
- public void testManagedBeans() {
+ @Override
+ public void prepareWorkspace() {
}
- @Test
- public void testDecorator() {
-
- }
@Test
- public void testInterceptor() {
+ public void testManagedBeans() {
+ String vetoBean = "Bean";
+ String otherBean = "OtherBean";
+ String projectName = "veto1";
+
+ importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", APPLICATION_CLASS).toTextEditor());
+
+ testVetoAnnotationImproperValue(projectName);
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", otherBean + ".java").toTextEditor());
+ editResourceUtil.replaceInEditor("public class " + otherBean,
+ "public class " + otherBean + " extends " + vetoBean);
+
+ testVetoAnnotationProperValue(projectName, "bean", otherBean, false, null);
+
}
@Test
public void testSessionBean() {
+ String vetoBean = "Bean";
+ String otherBean = "OtherBean";
+ String projectName = "veto2";
+
+ importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", APPLICATION_CLASS).toTextEditor());
+
+ testVetoAnnotationImproperValue(projectName);
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", otherBean + ".java").toTextEditor());
+ editResourceUtil.replaceInEditor("public class " + otherBean,
+ "public class " + otherBean + " extends " + vetoBean);
+
+ testVetoAnnotationProperValue(projectName, "bean", otherBean, false, null);
+
}
@Test
public void testProducerMethod() {
+ String vetoBean = "Bean";
+ String projectName = "veto3";
+
+ importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", APPLICATION_CLASS).toTextEditor());
+
+ testVetoAnnotationImproperValue(projectName);
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", vetoBean + ".java").toTextEditor());
+ editResourceUtil.replaceInEditor("@Veto", "");
+ editResourceUtil.replaceInEditor("import org.jboss.seam.solder.core.Veto;", "");
+
+ testVetoAnnotationProperValue(projectName, "manager", vetoBean,
+ true, "getManager");
+
}
@Test
public void testProducerField() {
+ String vetoBean = "Bean";
+ String projectName = "veto4";
+
+ importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", APPLICATION_CLASS).toTextEditor());
+
+ testVetoAnnotationImproperValue(projectName);
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", vetoBean + ".java").toTextEditor());
+ editResourceUtil.replaceInEditor("@Veto", "");
+ editResourceUtil.replaceInEditor("import org.jboss.seam.solder.core.Veto;", "");
+
+ testVetoAnnotationProperValue(projectName, "manager", vetoBean,
+ true, "manager");
+
}
-
+ @Ignore
@Test
public void testObserverMethods() {
+
+
}
+ /*@Ignore
+ @Test
+ public void testDecorator() {
+
+ }
+ @Ignore
+ @Test
+ public void testInterceptor() {
+
+ }*/
+ private void testVetoAnnotationImproperValue(String projectName) {
+
+ SWTBotTreeItem[] validationProblems = quickFixHelper.getProblems(
+ ProblemsType.WARNINGS, projectName);
+ assertTrue(validationProblems.length > 0);
+ assertTrue(validationProblems.length == 1);
+ assertContains(CDIConstants.NO_BEAN_IS_ELIGIBLE, validationProblems[0].getText());
+
+ }
+
+ private void testVetoAnnotationProperValue(String projectName, String openOnString, String openedClass,
+ boolean producer, String producerMethod) {
+ SWTBotTreeItem[] validationProblems = quickFixHelper.getProblems(
+ ProblemsType.WARNINGS, projectName);
+ assertTrue(validationProblems.length == 0);
+ assertTrue(openOnUtil.openOnByOption(openOnString, APPLICATION_CLASS, CDIConstants.OPEN_INJECT_BEAN));
+ assertTrue(getEd().getTitle().equals(openedClass + ".java"));
+ if (producer) {
+ assertTrue(getEd().getSelection().equals(producerMethod));
+ }
+ }
+
}
12 years, 3 months