Author: dgolovin
Date: 2008-06-19 01:53:36 -0400 (Thu, 19 Jun 2008)
New Revision: 8839
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/hyperlink/SeamViewHyperlinkPartitionerTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/AbstractSeamNewOperationTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12EARNewOperationTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12WARNewOperationTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
Log:
fix seam 2.0.0 related errors
duplicated code removed, now all tests uses base classes ffrom seam.core.test plugin
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2008-06-19 05:49:51
UTC (rev 8838)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2008-06-19 05:53:36
UTC (rev 8839)
@@ -39,6 +39,10 @@
org.eclipse.jdt.ui,
org.jboss.tools.vpe.ui.test;bundle-version="1.0.0"
Export-Package: org.jboss.tools.seam.ui.test,
+ org.jboss.tools.seam.ui.test.ca,
+ org.jboss.tools.seam.ui.test.hyperlink,
+ org.jboss.tools.seam.ui.test.jbide,
+ org.jboss.tools.seam.ui.test.preferences,
org.jboss.tools.seam.ui.test.view,
org.jboss.tools.seam.ui.test.wizard
Bundle-ClassPath: seam-ui.jar
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -14,7 +14,6 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jboss.tools.seam.core.test.refactoring.SeamPropertyRefactoringTest;
import org.jboss.tools.seam.ui.test.ca.SeamELContentAssistJbide1645Test;
import org.jboss.tools.seam.ui.test.ca.SeamELContentAssistJbide1676Test;
import org.jboss.tools.seam.ui.test.ca.SeamELContentAssistTest;
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -10,6 +10,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
@@ -42,17 +43,10 @@
return new TestSuite(SeamELContentAssistTest.class);
}
- public void setUp() throws Exception {
- provider = new TestProjectProvider("org.jboss.tools.seam.ui.test", null,
PROJECT_NAME, makeCopy);
+ public void setUp() throws CoreException {
+ provider = new TestProjectProvider("org.jboss.tools.seam.ui.test", null,
PROJECT_NAME, makeCopy);
project = provider.getProject();
- Throwable exception = null;
- try {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception x) {
- exception = x;
- x.printStackTrace();
- }
- assertNull("An exception caught: " + (exception != null?
exception.getMessage() : ""), exception);
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
}
protected void tearDown() throws Exception {
@@ -65,11 +59,6 @@
* Test for
http://jira.jboss.com/jira/browse/JBIDE-1258
*/
public void testMessages() {
- try {
- EditorTestHelper.joinBackgroundActivities();
- } catch (Exception e) {
- JUnitUtils.fail(e.getMessage(), e);;
- }
assertTrue("Test project \"" + PROJECT_NAME + "\" is not
loaded", (project != null));
checkProposals("/WebContent/messages.xhtml", 494, new
String[]{"messages.Text1", "messages.Text2"}, true);
}
@@ -79,11 +68,6 @@
*
http://jira.jboss.com/jira/browse/JBIDE-2007
*/
public void testVarAttributes() {
- try {
- EditorTestHelper.joinBackgroundActivities();
- } catch (Exception e) {
- e.printStackTrace();
- }
assertTrue("Test project \"" + PROJECT_NAME + "\" is not
loaded", (project != null));
IFile component =
project.getFile("src/action/demo/TestComponentForVarAttributes.java");
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/hyperlink/SeamViewHyperlinkPartitionerTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/hyperlink/SeamViewHyperlinkPartitionerTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/hyperlink/SeamViewHyperlinkPartitionerTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -11,8 +11,10 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentExtension3;
import org.eclipse.jface.text.ITypedRegion;
@@ -55,13 +57,10 @@
}
}
- public void testSeamViewPartitioner() {
- try {
- EditorTestHelper.joinBackgroundActivities();
- } catch (Exception e) {
- e.printStackTrace();
- fail("Waiting for the jobs to complete has failed.");
- }
+ public void testSeamViewPartitioner() throws CoreException {
+
+ EditorTestHelper.joinBackgroundActivities();
+
assertTrue("Test project \"" + PROJECT_NAME + "\" is not
loaded", (project != null));
IFile jspFile = project.getFile(PAGE_NAME);
@@ -73,40 +72,23 @@
IDocumentProvider documentProvider = null;
Throwable exception = null;
- try {
- documentProvider =
DocumentProviderRegistry.getDefault().getDocumentProvider(editorInput);
- } catch (Exception x) {
- exception = x;
- x.printStackTrace();
-
- }
- assertNull("An exception caught: " + (exception != null?
exception.getMessage() : ""), exception);
- assertTrue("The document provider for the file \"" + PAGE_NAME +
"\" is not loaded", (documentProvider != null));
+ documentProvider =
DocumentProviderRegistry.getDefault().getDocumentProvider(editorInput);
+ assertNotNull("The document provider for the file \"" + PAGE_NAME +
"\" is not loaded", documentProvider);
- try {
- documentProvider.connect(editorInput);
- } catch (Exception x) {
- exception = x;
- x.printStackTrace();
- assertTrue("The document provider is not able to be initialized with the editor
input", false);
- }
- assertNull("An exception caught: " + (exception != null?
exception.getMessage() : ""), exception);
+
+ documentProvider.connect(editorInput);
IDocument document = documentProvider.getDocument(editorInput);
assertTrue("The document for the file \"" + PAGE_NAME + "\" is
not loaded", (document != null));
- IStructuredModel model = null;
- if (document instanceof IStructuredDocument) {
- // corresponding releaseFromEdit occurs in
- // dispose()
- model = StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument)
document);
- EditorModelUtil.addFactoriesTo(model);
- }
-
+ assertTrue("Document should be instance of IStructuredDocument",document
instanceof IStructuredDocument);
+ IStructuredModel model =
StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument) document);
assertTrue("The document model for the file \"" + PAGE_NAME +
"\" is not loaded", (model != null));
-
+
+ EditorModelUtil.addFactoriesTo(model);
+
SeamViewHyperlinkPartitioner seamViewPartitioner = new SeamViewHyperlinkPartitioner();
TestHyperlinkDetector detector = new TestHyperlinkDetector();
@@ -125,7 +107,7 @@
boolean recognized = false;
if (partitionTypes != null && partitionTypes.length > 0) {
- recognized =
("org.jboss.tools.seam.text.ext.SEAM_VIEW_LINK".equals(partitionTypes[0]));
+ recognized =
("org.eclipse.jst.jsp.core.jspsource".equals(partitionTypes[0]));
}
if (recognized) {
@@ -134,8 +116,8 @@
if (recognized) {
String childPartitionType =
seamViewPartitioner.getChildPartitionType(testData.document,
testData.getHyperlinkRegion());
-// if (childPartitionType != null)
-// System.out.println("position #" + i + " partitionType: " +
childPartitionType);
+ if (childPartitionType != null)
+ System.out.println("position #" + i + " partitionType: " +
childPartitionType);
if (childPartitionType != null) {
ArrayList test = (ArrayList)recognitionTest.get(childPartitionType);
@@ -169,15 +151,15 @@
r = (Region)regions.next();
if (r.getOffset() <= testData.offset && testData.offset <
(r.getOffset() + r.getLength()))
testResult = true;
+ System.out.println(testData.getHyperlinkRegion().toString());
}
}
assertTrue("Wrong recognition for the region: " +
testData.getHyperlinkRegion().toString()
- + " matches the wrong region [" + r.getOffset() + "-" +
(r.getOffset() + r.getLength()) + "]" , (testResult == false));
+ + " matches the wrong region [" + r.getOffset() + "-" +
(r.getOffset() + r.getLength()) + "] in file \"" + PAGE_NAME +
"\"" , (testResult == false));
}
}
- assertTrue("Wrong recognized region count: " + counter
- + " (must be 24)" , (counter == 24));
+ assertEquals("Wrong recognized region count", 24 , counter);
model.releaseFromEdit();
@@ -209,7 +191,9 @@
region = (document instanceof IDocumentExtension3 ?
((IDocumentExtension3)document).getDocumentPartitioner("org.eclipse.wst.sse.core.default_structured_text_partitioning").getPartition(offset)
:
document.getDocumentPartitioner().getPartition(offset));
- } catch (Exception x) {}
+ } catch (Exception x) {
+ x.printStackTrace();
+ }
return region;
}
@@ -235,7 +219,13 @@
return region.getOffset();
}
public String toString() {
- return "[" + getOffset() + "-" + (getOffset() +
getLength() - 1) + ":" + getType() + ":" + getContentType() +
"]";
+ try {
+ return document.get(getOffset(), getLength()) + " [" + getOffset() +
"-" + (getOffset() + getLength() - 1) + ":" + getType() +
":" + getContentType() + "]";
+ } catch (BadLocationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return "";
}
};
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -103,7 +103,7 @@
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, false);
assertNotNull("Can't load seam project. It seems seam nature was not added to
rpoject by seam settings page.", seamProject);
-
+
IEclipsePreferences pref = SeamCorePlugin.getSeamPreferences(project);
assertEquals("Seam settings version 1.1 property is not set",
pref.get(ISeamFacetDataModelProperties.SEAM_SETTINGS_VERSION, ""),
ISeamFacetDataModelProperties.SEAM_SETTINGS_VERSION_1_1);
assertEquals("Seam runtime property is not set",
pref.get(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, ""), RUNTIME_NAME);
@@ -117,5 +117,7 @@
assertEquals("Test package name property is not set",
pref.get(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, ""),
TEST_PACKAGE_NAME);
assertEquals("Test source folder property is not set",
pref.get(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER, ""), "/" +
PROJECT_NAME + "/src");
assertEquals("View folder property is not set",
pref.get(ISeamFacetDataModelProperties.WEB_CONTENTS_FOLDER, ""), "/" +
PROJECT_NAME);
+
+ assertTrue("Seam Nature was not enabled for project \"" +
project.getName() + "\"",project.hasNature(ISeamProject.NATURE_ID));
}
}
\ No newline at end of file
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -142,7 +142,7 @@
seamPackage = findSeamPackage(tree, "myPackage");
assertTrue("Expected package 'myPackage' was not found it tree",
seamPackage!=null);
-
+ EditorTestHelper.runEventQueue(1000);
component = findSeamComponent(seamPackage, "myPackage.myTextComponent");
assertTrue("Expected component 'myPackage.myTextComponent' not found
" +
"after renaming",component!=null);
@@ -534,6 +534,7 @@
count++;
if(count > NUMBER_OF_REFRESHES) break;
}
+ EditorTestHelper.runEventQueue(1000);
}
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/AbstractSeamNewOperationTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/AbstractSeamNewOperationTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/AbstractSeamNewOperationTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -52,6 +52,7 @@
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
+import org.jboss.tools.seam.core.test.project.facet.AbstractSeamFacetTest;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import
org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDataModelProvider;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
@@ -66,16 +67,11 @@
import org.jboss.tools.test.util.xpl.EditorTestHelper;
import org.osgi.service.prefs.BackingStoreException;
-abstract public class AbstractSeamNewOperationTest extends TestCase {
+abstract public class AbstractSeamNewOperationTest extends AbstractSeamFacetTest {
+
protected static final IWorkspace ws = ResourcesPlugin.getWorkspace();
protected static final IWorkbench wb = PlatformUI.getWorkbench();
- protected static final String SEAM_1_2 = "Seam 1.2.0";
- protected static final String SEAM_2_0 = "Seam 2.0.0";
-
- protected static final String SEAM_1_2_HOME =
"jbosstools.test.seam.1.2.1.eap.home";
- protected static final String SEAM_2_0_HOME =
"jbosstools.test.seam.2.0.1.GA.home";
-
private static final String SEAM_ACTION_COMPONENT_NAME = "TestAction";
private static final String SEAM_FORM_COMPONENT_NAME = "TestForm";
private static final String SEAM_CONVERSATION_COMPONENT_NAME =
"TestConversation";
@@ -88,52 +84,27 @@
protected final Set<IResource> resourcesToCleanup = new
HashSet<IResource>();
- protected static final IProjectFacetVersion dynamicWebVersion;
- protected static final IProjectFacetVersion javaVersion;
- protected static final IProjectFacetVersion javaFacesVersion;
private static final IProjectFacet seamFacet;
static {
- javaVersion =
ProjectFacetsManager.getProjectFacet("jst.java").getVersion("5.0");
- dynamicWebVersion =
ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.5");
- javaFacesVersion =
ProjectFacetsManager.getProjectFacet("jst.jsf").getVersion("1.2");
seamFacet = ProjectFacetsManager.getProjectFacet("jst.seam");
}
-
- public AbstractSeamNewOperationTest() {
+
+ protected AbstractSeamNewOperationTest(String name) {
+ super(name);
+ // TODO Auto-generated constructor stub
}
protected void setUp() throws Exception {
super.setUp();
- try { EditorTestHelper.joinBackgroundActivities(); }
- catch (Exception e) { JUnitUtils.fail(e.getMessage(), e); }
+ try {
+ EditorTestHelper.joinBackgroundActivities(); }
+ catch (Exception e) {
+ JUnitUtils.fail(e.getMessage(), e);
+ }
EditorTestHelper.runEventQueue(3000);
}
- protected void tearDown() throws Exception {
- // Wait until all jobs is finished to avoid delete project problems
- EditorTestHelper.joinBackgroundActivities();
- EditorTestHelper.runEventQueue(3000);
- Exception last = null;
- for (IResource r : this.resourcesToCleanup) {
- try {
- System.out.println("Deleting " + r);
- ((IProject)r).close(null);
- r.delete(true, null);
- } catch(Exception e) {
- System.out.println("Error deleting " + r);
- e.printStackTrace();
- last = e;
- }
- }
-
- if(last!=null) throw last;
-
- resourcesToCleanup.clear();
-
- super.tearDown();
- }
-
abstract protected IProject getProject();
abstract void setUpSeamProjects();
@@ -180,103 +151,24 @@
JUnitUtils.fail(e.getMessage(), e);
}
}
-
- protected IFacetedProject createSeamWarProject(String name) throws CoreException {
- final IFacetedProject fproj = createSeamProject(name,
createSeamDataModel("war"));
- final IProject proj = fproj.getProject();
-
- assertNotNull(proj);
- assertTrue(proj.exists());
-
- assertTrue(proj.getWorkspace().getRoot().getProject(proj.getName() +
"-test").exists());
- IProject testProject = proj.getWorkspace().getRoot().getProject(proj.getName() +
"-test");
- this.addResourceToCleanup(testProject);
- this.addResourceToCleanup(proj);
-
- return fproj;
- }
-
- protected IDataModel createSeamDataModel(String deployType) {
- IDataModel config = (IDataModel) new SeamFacetInstallDataModelProvider().create();
- config.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
getSeamRTName());
- config.setBooleanProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS, true);
- config.setBooleanProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY,
false);
- config.setStringProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
deployType);
- config.setStringProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME,
"org.session.beans");
- config.setStringProperty(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME,
"org.entity.beans");
- config.setStringProperty(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME,
"org.test.beans");
- config.setStringProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE,
"noop-connection");
- config.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH, new String[] {
"noop-driver.jar" });
- return config;
- }
-
- protected IFacetedProject createSeamProject(String baseProjectName, IDataModel config)
throws CoreException {
- final IFacetedProject fproj = ProjectFacetsManager.create(baseProjectName, null,
- null);
-
- installDependentFacets(fproj);
-// new SeamFacetPreInstallDelegate().execute(fproj.getProject(), getSeamFacetVersion(),
config, null);
- fproj.installProjectFacet(getSeamFacetVersion(getSeamRTName()), config, null);
-
- SeamProjectsSet seamProjectsSet = new SeamProjectsSet(fproj.getProject());
- assertTrue(seamProjectsSet.getActionFolder().exists());
- assertTrue(seamProjectsSet.getModelFolder().exists());
-
- return fproj;
- }
-
- protected void installDependentFacets(final IFacetedProject fproj) throws CoreException
{
- fproj.installProjectFacet(javaVersion, null, null);
- fproj.installProjectFacet(dynamicWebVersion, null, null);
- fproj.installProjectFacet(javaFacesVersion, null, null);
- }
-
protected IProjectFacetVersion getSeamFacetVersion(String seamRTName) {
assertTrue("Wrong SEAM run-time name is specified: " + seamRTName,
- (SEAM_1_2.equals(seamRTName) || SEAM_2_0.equals(seamRTName)));
- if (SEAM_1_2.equals(seamRTName)) {
+ (AbstractSeamFacetTest.SEAM_1_2_0.equals(seamRTName) ||
AbstractSeamFacetTest.SEAM_2_0_0.equals(seamRTName)));
+ if (AbstractSeamFacetTest.SEAM_1_2_0.equals(seamRTName)) {
return seamFacet.getVersion("1.2");
- } else if (SEAM_2_0.equals(seamRTName)) {
+ } else if (AbstractSeamFacetTest.SEAM_1_2_0.equals(seamRTName)) {
return seamFacet.getVersion("2.0");
}
return null;
}
- protected final void addResourceToCleanup(final IResource resource) {
- this.resourcesToCleanup.add(resource);
- }
-
- protected IFacetedProject createSeamEarProject(String name) throws CoreException {
- final IFacetedProject fproj = createSeamProject(name,
createSeamDataModel("ear"));
-
- final IProject proj = fproj.getProject();
- assertNotNull(proj);
-
- IProject testProject = proj.getWorkspace().getRoot().getProject(proj.getName() +
"-test");
- IProject ejbProject = proj.getWorkspace().getRoot().getProject(proj.getName() +
"-ejb");
- IProject earProject = proj.getWorkspace().getRoot().getProject(proj.getName() +
"-ear");
-
- this.resourcesToCleanup.add(proj);
- this.resourcesToCleanup.add(testProject);
- this.resourcesToCleanup.add(ejbProject);
- this.resourcesToCleanup.add(earProject);
-
- assertTrue(proj.exists());
- assertTrue(testProject.exists());
- assertTrue(ejbProject.exists());
- assertTrue(earProject.exists());
-
- return fproj;
- }
-
-
protected File getSeamHomeFolder(String seamRTName) {
File seamHome = null;
- if (SEAM_1_2.equals(seamRTName)) {
+ if (AbstractSeamFacetTest.SEAM_1_2_0.equals(seamRTName)) {
seamHome = new File(System.getProperty(SEAM_1_2_HOME));
- } else if (SEAM_2_0.equals(seamRTName)) {
+ } else if (AbstractSeamFacetTest.SEAM_2_0_0.equals(seamRTName)) {
seamHome = new File(System.getProperty(SEAM_2_0_HOME));
}
@@ -284,9 +176,9 @@
}
protected SeamVersion getSeamRTVersion(String seamRTName) {
- if (SEAM_1_2.equals(seamRTName)) {
+ if (AbstractSeamFacetTest.SEAM_1_2_0.equals(seamRTName)) {
return SeamVersion.SEAM_1_2;
- } else if (SEAM_2_0.equals(seamRTName)) {
+ } else if (AbstractSeamFacetTest.SEAM_2_0_0.equals(seamRTName)) {
return SeamVersion.SEAM_2_0;
}
return null;
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12EARNewOperationTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12EARNewOperationTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12EARNewOperationTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -27,6 +27,7 @@
import org.jboss.tools.test.util.xpl.EditorTestHelper;
public class Seam12EARNewOperationTest extends AbstractSeamNewOperationTest {
+
private static final String SEAM_EAR_PROJECTNAME = "seam_ear";
private static final String SEAM_EAR_EJB_PROJECTNAME = "seam_ear-ejb";
private static final String SEAM_EAR_EAR_PROJECTNAME = "seam_ear-ear";
@@ -39,11 +40,11 @@
private ISeamProject seamEarEjbProject = null;
private ISeamProject seamTestProject = null;
+ public Seam12EARNewOperationTest(String name) {
+ super(name);
+ // TODO Auto-generated constructor stub
+ }
- public Seam12EARNewOperationTest() {
- super();
- }
-
protected void setUp() throws Exception {
super.setUp();
@@ -312,6 +313,6 @@
@Override
protected String getSeamRTName() {
- return AbstractSeamNewOperationTest.SEAM_1_2;
+ return AbstractSeamNewOperationTest.SEAM_1_2_0;
}
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12WARNewOperationTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12WARNewOperationTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam12WARNewOperationTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -37,8 +37,8 @@
private ISeamProject seamTestProject = null;
- public Seam12WARNewOperationTest() {
- super();
+ public Seam12WARNewOperationTest(String name) {
+ super(name);
}
protected void setUp() throws Exception {
@@ -91,7 +91,7 @@
}
protected String getSeamRTName() {
- return AbstractSeamNewOperationTest.SEAM_1_2;
+ return AbstractSeamNewOperationTest.SEAM_1_2_0;
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20EARNewOperationTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -11,6 +11,12 @@
package org.jboss.tools.seam.ui.test.wizard;
public class Seam20EARNewOperationTest extends Seam12EARNewOperationTest {
+
+ public Seam20EARNewOperationTest(String name) {
+ super(name);
+ // TODO Auto-generated constructor stub
+ }
+
@Override
void setUpSeamProjects() {
setUpSeamProject(earProject);
@@ -18,6 +24,6 @@
@Override
protected String getSeamRTName() {
- return AbstractSeamNewOperationTest.SEAM_2_0;
+ return AbstractSeamNewOperationTest.SEAM_2_0_0;
}
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20WARNewOperationTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -11,6 +11,11 @@
package org.jboss.tools.seam.ui.test.wizard;
public class Seam20WARNewOperationTest extends Seam12WARNewOperationTest {
+ public Seam20WARNewOperationTest(String name) {
+ super(name);
+ // TODO Auto-generated constructor stub
+ }
+
@Override
void setUpSeamProjects() {
setUpSeamProject(warProject);
@@ -18,6 +23,6 @@
@Override
protected String getSeamRTName() {
- return AbstractSeamNewOperationTest.SEAM_2_0;
+ return AbstractSeamNewOperationTest.SEAM_2_0_0;
}
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2008-06-19
05:49:51 UTC (rev 8838)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2008-06-19
05:53:36 UTC (rev 8839)
@@ -77,9 +77,7 @@
*
*/
public void testSeamProjectNewWizardInstanceIsCreated() {
- IWizardPage projectFacetsWizPg = wizard.getNextPage(startSeamPrjWzPg);
- assertNotNull("Cannot create select facets wizard page",projectFacetsWizPg);
- IWizardPage webModuleWizPg = wizard.getNextPage(projectFacetsWizPg);
+ IWizardPage webModuleWizPg = wizard.getNextPage(startSeamPrjWzPg);
assertNotNull("Cannot create dynamic web project wizard
page",webModuleWizPg);
IWizardPage jsfCapabilitiesWizPg = wizard.getNextPage(webModuleWizPg);
assertNotNull("Cannot create JSF capabilities wizard
page",jsfCapabilitiesWizPg);