JBoss Tools SVN: r39710 - in trunk: vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-03-21 11:00:11 -0400 (Wed, 21 Mar 2012)
New Revision: 39710
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/ExternalEditingTest.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileHelper.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
Log:
Added tests ExternalEditingTest.
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileHelper.java 2012-03-21 14:53:37 UTC (rev 39709)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileHelper.java 2012-03-21 15:00:11 UTC (rev 39710)
@@ -12,10 +12,12 @@
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
+import java.io.BufferedWriter;
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -204,4 +206,16 @@
if (!dir.mkdirs())
throw new RuntimeException("Can not create dir " + dir);
}
+ /**
+ * Modify file fileLocation to have content fileContent
+ * @param fileLocation
+ * @param fileContent
+ * @throws IOException
+ */
+ public static void modifyTextFile(String fileLocation, String fileContent) throws IOException{
+ File file = new File(fileLocation);
+ BufferedWriter bwOutput = new BufferedWriter(new FileWriter(file));
+ bwOutput.write(fileContent);
+ bwOutput.close();
+ }
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2012-03-21 14:53:37 UTC (rev 39709)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2012-03-21 15:00:11 UTC (rev 39710)
@@ -14,6 +14,7 @@
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.vpe.ui.bot.test.editor.BlockCommentTest;
import org.jboss.tools.vpe.ui.bot.test.editor.EditingActionsTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.ExternalEditingTest;
import org.jboss.tools.vpe.ui.bot.test.editor.InsertActionsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.MinMaxPanesTest;
import org.jboss.tools.vpe.ui.bot.test.editor.StylesOnThePageTest;
@@ -210,7 +211,8 @@
SummaryTagTest.class,
SelectTagTest.class,
RichFacesComponentTest.class,
- UnicodeCharacterDisplayingTest.class
+ UnicodeCharacterDisplayingTest.class,
+ ExternalEditingTest.class
})
public class VPEAllBotTests extends SWTBotTestCase{
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/ExternalEditingTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/ExternalEditingTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/ExternalEditingTest.java 2012-03-21 15:00:11 UTC (rev 39710)
@@ -0,0 +1,169 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2010 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor;
+
+import java.awt.event.KeyEvent;
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.helper.FileHelper;
+import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+/**
+ * Tests editing of web page via external editor
+ * @author vlado pakan
+ *
+ */
+public class ExternalEditingTest extends VPEEditorTestCase {
+
+ private SWTBotExt botExt = null;
+
+ private SWTBotEclipseEditor jspEditor;
+
+ public ExternalEditingTest() {
+ super();
+ botExt = new SWTBotExt();
+ }
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ eclipse.maximizeActiveShell();
+ bot.closeAllEditors();
+ }
+ /**
+ * Checks External Editing of web page when accepting External changes
+ */
+ public void testAcceptExternalChanges(){
+ final String acceptExtChangesPageName = "ExternalEditingTestAccept.jsp";
+ createJspPage(acceptExtChangesPageName);
+ jspEditor = botExt.editorByTitle(acceptExtChangesPageName).toTextEditor();
+ final String originalPageContent = "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ "<html>\n" +
+ " <body>\n" +
+ " </body>\n" +
+ "</html>";
+ jspEditor.setText(originalPageContent);
+ jspEditor.save();
+ // modify web page externally
+ final String changedPageContent = "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ "<html>\n" +
+ " <body>\n" +
+ " !@#$%CHANGED_TEXT%$#@!\n" +
+ " </body>\n" +
+ "</html>";
+ try {
+ FileHelper.modifyTextFile(getPageLocation(acceptExtChangesPageName),
+ changedPageContent);
+ } catch (IOException ioe) {
+ throw new RuntimeException(ioe);
+ }
+ new TypeKeyCodesThread(new int[] {KeyEvent.VK_ENTER})
+ .start();
+ jspEditor.setFocus();
+ String sourceText = jspEditor.getText();
+ assertTrue("VPE Source pane has to contain text\n" + changedPageContent +
+ "'\nbut it contains\n" +
+ sourceText,
+ sourceText.equals(changedPageContent));
+ }
+ @Override
+ protected void closeUnuseDialogs() {
+
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+ @Override
+ public void tearDown() throws Exception {
+ jspEditor.close();
+ super.tearDown();
+ }
+ /**
+ * Returns absolute page pageName location
+ * @param pageName
+ * @return
+ */
+ private String getPageLocation (String pageName){
+ StringBuffer sbPageLocation = new StringBuffer("");
+ sbPageLocation.append(FileHelper.getProjectLocation(VPEAutoTestCase.JBT_TEST_PROJECT_NAME, botExt));
+ sbPageLocation.append(File.separator);
+ sbPageLocation.append("WebContent");
+ sbPageLocation.append(File.separator);
+ sbPageLocation.append("pages");
+ sbPageLocation.append(File.separator);
+ sbPageLocation.append(pageName);
+ return sbPageLocation.toString();
+ }
+ /**
+ * Checks External Editing of web page when deny External changes
+ */
+ public void testDenyExternalChanges(){
+ final String denyExtChangesPageName = "ExternalEditingTestDeny.jsp";
+ createJspPage(denyExtChangesPageName);
+ jspEditor = botExt.editorByTitle(denyExtChangesPageName).toTextEditor();
+ final String originalPageContent = "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ "<html>\n" +
+ " <body>\n" +
+ " </body>\n" +
+ "</html>";
+ jspEditor.setText(originalPageContent);
+ jspEditor.save();
+ // modify web page externally
+ final String changedPageContent = "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ "<html>\n" +
+ " <body>\n" +
+ " !@#$%CHANGED_TEXT%$#@!\n" +
+ " </body>\n" +
+ "</html>";
+ try {
+ FileHelper.modifyTextFile(getPageLocation(denyExtChangesPageName),
+ changedPageContent);
+ } catch (IOException ioe) {
+ throw new RuntimeException(ioe);
+ }
+ new TypeKeyCodesThread(new int[] {KeyEvent.VK_TAB,KeyEvent.VK_ENTER})
+ .start();
+ jspEditor.setFocus();
+ String sourceText = jspEditor.getText();
+ assertTrue("VPE Source pane has to contain text\n" + originalPageContent +
+ "'\nbut it contains\n" +
+ sourceText,
+ sourceText.equals(originalPageContent));
+ }
+ /**
+ * Thread closing dialog displayed when page is modified externally
+ */
+ class TypeKeyCodesThread extends Thread {
+ private int[] keyCodes;
+ public TypeKeyCodesThread (int[] keyCodes){
+ super();
+ this.keyCodes = keyCodes;
+ }
+ public void run() {
+ try {
+ System.out.println("**-- start thread");
+ sleep(Timing.time5S());
+ for (int keyCode : keyCodes){
+ System.out.println("**--Type: " + keyCode);
+ KeyboardHelper.typeKeyCodeUsingAWT(keyCode);
+ sleep(Timing.time2S());
+ }
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/ExternalEditingTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years
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);
}
14 years
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
14 years
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
14 years
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) {
14 years
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 " +
14 years
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;
}
14 years
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 {
+
+}
14 years
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 {
14 years
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
14 years