JBoss Tools SVN: r40009 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-04-03 10:23:04 -0400 (Tue, 03 Apr 2012)
New Revision: 40009
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
Log:
ActionItem for JPA Entity fixed
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2012-04-03 14:22:08 UTC (rev 40008)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2012-04-03 14:23:04 UTC (rev 40009)
@@ -5222,7 +5222,7 @@
* represents item : JPA->Entity
*/
public static final INewObject LABEL = new INewObject() {
- public String getName() { return "Entity";}
+ public String getName() { return "JPA Entity";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
l.add("JPA");
12 years, 9 months
JBoss Tools SVN: r40008 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-04-03 10:22:08 -0400 (Tue, 03 Apr 2012)
New Revision: 40008
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
Log:
Fix unlimited wait condition
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2012-04-03 12:43:41 UTC (rev 40007)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2012-04-03 14:22:08 UTC (rev 40008)
@@ -69,7 +69,7 @@
public static int TIME_20S = Timing.time20S();
public static int TIME_30S = Timing.time30S();
public static int TIME_60S = Timing.time60S();
- public static int TIME_UNLIMITED = Timing.time60S();
+ public static int TIME_UNLIMITED = Timing.timeUnlimited();
protected void setUp() throws Exception {
super.setUp();
12 years, 9 months
JBoss Tools SVN: r40007 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-03 08:43:41 -0400 (Tue, 03 Apr 2012)
New Revision: 40007
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Log:
Quick Fix menu item added
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-04-03 12:42:52 UTC (rev 40006)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-04-03 12:43:41 UTC (rev 40007)
@@ -38,6 +38,7 @@
public static final String JSP_FILE = "JSP File";
public static final String PROPERTIES = "Properties";
public static final String XHTML_FILE = "XHTML File";
+ public static final String QUICK_FIX = "Quick Fix";
public static final String HELP = "Help";
public static final String ABOUT_JBOSS_DEVELOPER_STUDIO = "About JBoss Developer Studio";
public static final String HIBERNATE_CODE_GENERATION = "Hibernate Code Generation...";
12 years, 9 months
JBoss Tools SVN: r40006 - 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-04-03 08:42:52 -0400 (Tue, 03 Apr 2012)
New Revision: 40006
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/FullyQualifiedTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/RequiresAnnotationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java
Log:
modified all annotation-like tests to be up-to-date
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-04-03 12:41:33 UTC (rev 40005)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/ExactAnnotationTest.java 2012-04-03 12:42:52 UTC (rev 40006)
@@ -58,7 +58,7 @@
String peopleManager = "PeopleManager";
String otherManager = "OtherManager";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), className).toTextEditor());
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/FullyQualifiedTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/FullyQualifiedTest.java 2012-04-03 12:41:33 UTC (rev 40005)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/FullyQualifiedTest.java 2012-04-03 12:42:52 UTC (rev 40006)
@@ -46,7 +46,7 @@
String projectName = "fullyQualified1";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -63,7 +63,7 @@
String projectName = "fullyQualified2";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -89,7 +89,7 @@
String projectName = "fullyQualified3";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -110,7 +110,7 @@
String projectName = "fullyQualified4";
String myBean1 = "MyBean1.java";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), myBean1).toTextEditor());
@@ -135,7 +135,7 @@
String projectName = "fullyQualified5";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -172,7 +172,7 @@
String projectName = "fullyQualified6";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -228,7 +228,7 @@
String projectName = "fullyQualified7";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/RequiresAnnotationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/RequiresAnnotationTest.java 2012-04-03 12:41:33 UTC (rev 40005)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/RequiresAnnotationTest.java 2012-04-03 12:42:52 UTC (rev 40006)
@@ -40,7 +40,7 @@
String manager = "Manager";
String projectName = "requires1";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -63,7 +63,7 @@
String manager = "Manager";
String projectName = "requires2";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -86,7 +86,7 @@
String manager = "Manager";
String projectName = "requires3";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -110,7 +110,7 @@
String manager = "Manager";
String projectName = "requires4";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -135,7 +135,7 @@
String projectName = "requires5";
String eventAttribute = "eventAttribute";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
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-04-03 12:41:33 UTC (rev 40005)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java 2012-04-03 12:42:52 UTC (rev 40006)
@@ -40,7 +40,7 @@
String otherBean = "OtherBean";
String projectName = "veto1";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -63,7 +63,7 @@
String otherBean = "OtherBean";
String projectName = "veto2";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -85,7 +85,7 @@
String vetoBean = "Bean";
String projectName = "veto3";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -108,7 +108,7 @@
String vetoBean = "Bean";
String projectName = "veto4";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
@@ -132,7 +132,7 @@
String projectName = "veto5";
String eventAttribute = "eventAttribute";
- importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
+ importSeam3ProjectWithLibrary(projectName, SeamLibraries.SOLDER);
setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
getPackageName(), APPLICATION_CLASS).toTextEditor());
12 years, 9 months
JBoss Tools SVN: r40005 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-03 08:41:33 -0400 (Tue, 03 Apr 2012)
New Revision: 40005
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java
Log:
Modified according to new changes in Seam3TestBase
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-04-03 12:40:57 UTC (rev 40004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java 2012-04-03 12:41:33 UTC (rev 40005)
@@ -6,7 +6,9 @@
@Override
public void prepareWorkspace() {
- importProjectWithLibrary(getProjectName(), SeamLibraries.SOLDER);
+ if (!projectHelper.projectExists(getProjectName())) {
+ importSeam3ProjectWithLibrary(getProjectName(), SeamLibraries.SOLDER);
+ }
}
}
12 years, 9 months
JBoss Tools SVN: r40004 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-03 08:40:57 -0400 (Tue, 03 Apr 2012)
New Revision: 40004
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java
Log:
small fixes and modifications implemented
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java 2012-04-03 12:37:22 UTC (rev 40003)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java 2012-04-03 12:40:57 UTC (rev 40004)
@@ -48,8 +48,11 @@
@Override
public void prepareWorkspace() {
- importSeam3TestProject("/resources/projects/" +
- getProjectName(), projectName);
+ if (!projectHelper.projectExists(getProjectName())) {
+ importSeam3TestProject("/resources/projects/" +
+ getProjectName(), getProjectName());
+ }
+
}
protected void importSeam3TestProject(String projectLocation, String dir) {
@@ -61,7 +64,7 @@
checkLibraryInProject(projectName, library.getName());
}
- protected void importProjectWithLibrary(String projectName, SeamLibraries library) {
+ protected void importSeam3ProjectWithLibrary(String projectName, SeamLibraries library) {
importSeam3TestProject("/resources/projects/" + projectName, projectName);
addAndCheckLibraryInProject(projectName, library);
eclipse.cleanAllProjects();
12 years, 9 months
JBoss Tools SVN: r40003 - 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-04-03 08:37:22 -0400 (Tue, 03 Apr 2012)
New Revision: 40003
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
Log:
modified to include new bot test as well
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2012-04-03 12:36:57 UTC (rev 40002)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2012-04-03 12:37:22 UTC (rev 40003)
@@ -24,6 +24,7 @@
import org.jboss.tools.cdi.bot.test.quickfix.test.IBindingValidationQuickFixTest;
import org.jboss.tools.cdi.bot.test.quickfix.test.InterceptorValidationQuickFixTest;
import org.jboss.tools.cdi.bot.test.quickfix.test.QualifierValidationQuickFixTest;
+import org.jboss.tools.cdi.bot.test.quickfix.test.QuickFixProposalsDescriptionTest;
import org.jboss.tools.cdi.bot.test.quickfix.test.ScopeValidationQuickFixTest;
import org.jboss.tools.cdi.bot.test.quickfix.test.StereotypeValidationQuickFixTest;
import org.jboss.tools.cdi.bot.test.wizard.CDISupportTest;
@@ -59,8 +60,8 @@
*/
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
-// not included in JBDS anymore
-// PerspectiveTest.class,
+/* not included in JBDS anymore */
+/* PerspectiveTest.class, */
ConfigurationPresetTest.class,
FacetTest.class,
@@ -74,6 +75,7 @@
BeansXMLValidationTest.class,
BeansXMLCompletionTest.class,
ProblemEligibleInjectionTest.class,
+ QuickFixProposalsDescriptionTest.class,
BeansXMLValidationQuickFixTest.class,
StereotypeValidationQuickFixTest.class,
QualifierValidationQuickFixTest.class,
12 years, 9 months
JBoss Tools SVN: r40002 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-03 08:36:57 -0400 (Tue, 03 Apr 2012)
New Revision: 40002
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/QuickFixProposalsDescriptionTest.java
Log:
New cdi bot test implemented
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/QuickFixProposalsDescriptionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/QuickFixProposalsDescriptionTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/QuickFixProposalsDescriptionTest.java 2012-04-03 12:36:57 UTC (rev 40002)
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.quickfix.test;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem;
+import org.jboss.tools.cdi.bot.test.CDIConstants;
+import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.OpenOnOptionsDialog;
+import org.junit.Before;
+import org.junit.Test;
+
+public class QuickFixProposalsDescriptionTest extends CDITestBase {
+
+ @Override
+ public String getProjectName() {
+ return "CDIQuickFixProposals";
+ }
+
+ @Before
+ public void prepareWorkspace() {
+ if (!projectHelper.projectExists(getProjectName())) {
+ importCDITestProject("/resources/projects/" +
+ getProjectName(), getProjectName());
+ eclipse.cleanAllProjects();
+ }
+ }
+
+ @Test
+ public void testAddedCode() {
+
+ String className = "AddCodeBean.java";
+
+ setEd(packageExplorer.openFile(getProjectName(), CDIConstants.SRC,
+ getPackageName(), className).toTextEditor());
+
+ OpenOnOptionsDialog openOnDialog = quickFixHelper.openOnDialog(
+ "AddCodeBean", className);
+ assertNotNull(openOnDialog);
+
+ String proposeText = null;
+
+ for (SWTBotTableItem ti : openOnDialog.getAllOptions()) {
+ if (ti.getText().contains("Add java.io.Serializable")) {
+ proposeText = openOnDialog.setProposalOption(ti);
+ break;
+ }
+ }
+
+ assertNotNull(proposeText);
+
+ List<String> affectedLinesInProposal = Arrays.asList("import java.io.Serializable;",
+ "implements Serializable");
+
+ for (String affectedLine : affectedLinesInProposal) {
+ assertTrue(proposeText.contains(affectedLine));
+ String text = getEd().getText();
+ assertTrue(text.contains(affectedLine));
+ }
+
+ }
+
+ @Test
+ public void testRemovedCode() {
+
+ String className = "RemoveCodeBean.java";
+
+ setEd(packageExplorer.openFile(getProjectName(), CDIConstants.SRC,
+ getPackageName(), className).toTextEditor());
+
+ OpenOnOptionsDialog openOnDialog = quickFixHelper.openOnDialog(
+ "@Disposes String param1, @Observes String param2", className);
+ assertNotNull(openOnDialog);
+
+ String proposeText = null;
+
+ for (SWTBotTableItem ti : openOnDialog.getAllOptions()) {
+ if (ti.getText().contains("Delete annotation @Disposes")) {
+ proposeText = openOnDialog.setProposalOption(ti);
+ break;
+ }
+ }
+
+ assertNotNull(proposeText);
+
+ List<String> affectedLinesInProposal = Arrays.
+ asList("import javax.enterprise.inject.Disposes;",
+ "@Disposes String param1");
+
+ for (String affectedLine : affectedLinesInProposal) {
+ assertFalse(proposeText.contains(affectedLine));
+ String text = getEd().getText();
+ assertFalse(text.contains(affectedLine));
+ }
+
+ }
+
+ @Test
+ public void testEditedCode() {
+
+ String className = "EditCodeStereotype.java";
+
+ setEd(packageExplorer.openFile(getProjectName(), CDIConstants.SRC,
+ getPackageName(), className).toTextEditor());
+
+ OpenOnOptionsDialog openOnDialog = quickFixHelper.openOnDialog(
+ "@Named(\"name\")", className);
+ assertNotNull(openOnDialog);
+
+ String proposeText = null;
+
+ for (SWTBotTableItem ti : openOnDialog.getAllOptions()) {
+ if (ti.getText().contains("Change annotation '@Named")) {
+ proposeText = openOnDialog.setProposalOption(ti);
+ break;
+ }
+ }
+
+ assertNotNull(proposeText);
+
+ List<String> affectedLinesInProposal = Arrays.
+ asList("@Named");
+
+ for (String affectedLine : affectedLinesInProposal) {
+ assertTrue(proposeText.contains(affectedLine));
+ String text = getEd().getText();
+ assertTrue(text.contains(affectedLine));
+ }
+
+ affectedLinesInProposal = Arrays.
+ asList("@Named(\"name\")");
+
+ for (String affectedLine : affectedLinesInProposal) {
+ assertFalse(proposeText.contains(affectedLine));
+ String text = getEd().getText();
+ assertFalse(text.contains(affectedLine));
+ }
+
+ }
+
+}
12 years, 9 months
JBoss Tools SVN: r40001 - 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-04-03 08:36:26 -0400 (Tue, 03 Apr 2012)
New Revision: 40001
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
Log:
Refactoring CDITestBase
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-04-03 12:35:24 UTC (rev 40000)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-04-03 12:36:26 UTC (rev 40001)
@@ -13,7 +13,17 @@
import java.util.logging.Logger;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.jboss.tools.cdi.bot.test.uiutils.BeansXMLHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.CDIProjectHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.CDIWizardHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.EditorResourceHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.OpenOnHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.ProjectImportHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.QuickFixHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBaseExt;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
@@ -27,13 +37,31 @@
version = "6.0", operator = ">="))
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({ CDIAllBotTests.class })
-public class CDITestBase extends CDIBase {
+public class CDITestBase extends SWTTestExt {
private String projectName = "CDIProject";
private String packageName = "cdi";
+ private static SWTBotEclipseEditor ed;
protected static final Logger LOGGER = Logger.getLogger(CDITestBase.class.getName());
+ public static final CDIProjectHelper projectHelper = new CDIProjectHelper();
+ public static final BeansXMLHelper beansHelper = new BeansXMLHelper();
+ public static final CDIWizardHelper wizard = new CDIWizardHelper();
+ public static final CDIWizardBaseExt wizardExt = new CDIWizardBaseExt();
+ public static final OpenOnHelper openOnUtil = new OpenOnHelper();
+ public static final EditorResourceHelper editResourceUtil = new EditorResourceHelper();
+ public static final QuickFixHelper quickFixHelper = new QuickFixHelper();
+ public static final ProjectImportHelper projectImportHelper = new ProjectImportHelper();
+
+ public SWTBotEclipseEditor getEd() {
+ return ed;
+ }
+
+ public void setEd(SWTBotEclipseEditor ed) {
+ CDITestBase.ed = ed;
+ }
+
@Before
public void prepareWorkspace() {
if (!projectHelper.projectExists(getProjectName())) {
@@ -54,4 +82,8 @@
return packageName;
}
+ protected void importCDITestProject(String projectLocation, String dir) {
+ projectImportHelper.importTestProject(projectLocation, dir, PluginActivator.PLUGIN_ID);
+ }
+
}
\ No newline at end of file
12 years, 9 months
JBoss Tools SVN: r40000 - 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-04-03 08:35:24 -0400 (Tue, 03 Apr 2012)
New Revision: 40000
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java
Log:
CDIBase removed - not needed
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java 2012-04-03 12:34:57 UTC (rev 39999)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIBase.java 2012-04-03 12:35:24 UTC (rev 40000)
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.cdi.bot.test;
-
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
-import org.jboss.tools.cdi.bot.test.uiutils.BeansXMLHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.CDIProjectHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.CDIWizardHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.EditorResourceHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.OpenOnHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.ProjectImportHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.QuickFixHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBaseExt;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-
-public class CDIBase extends SWTTestExt {
-
- private static SWTBotEclipseEditor ed;
- public static final CDIProjectHelper projectHelper = new CDIProjectHelper();
- public static final BeansXMLHelper beansHelper = new BeansXMLHelper();
- public static final CDIWizardHelper wizard = new CDIWizardHelper();
- public static final CDIWizardBaseExt wizardExt = new CDIWizardBaseExt();
- public static final OpenOnHelper openOnUtil = new OpenOnHelper();
- public static final EditorResourceHelper editResourceUtil = new EditorResourceHelper();
- public static final QuickFixHelper quickFixHelper = new QuickFixHelper();
- public static final ProjectImportHelper projectImportHelper = new ProjectImportHelper();
-
-
- public SWTBotEclipseEditor getEd() {
- return ed;
- }
-
- public void setEd(SWTBotEclipseEditor ed) {
- CDIBase.ed = ed;
- }
-}
12 years, 9 months