Author: dgolovin
Date: 2008-01-31 19:02:48 -0500 (Thu, 31 Jan 2008)
New Revision: 6081
Removed:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTestSetup.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsAllTests.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
Switch SeamValidatorTestSetup to utility class ProjectImportTestSetup
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsAllTests.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsAllTests.java 2008-01-31
23:51:52 UTC (rev 6080)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsAllTests.java 2008-02-01
00:02:48 UTC (rev 6081)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.seam.core.test;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -21,7 +23,7 @@
public static Test suite() {
TestSuite suite = new TestSuite();
- suite.addTest(new SeamValidatorsTestSetup(new TestSuite(SeamValidatorsTest.class)));
+ suite.addTest(new ProjectImportTestSetup(new
TestSuite(SeamValidatorsTest.class),"org.jboss.tools.seam.core.test","projects/SeamWebWarTestProject","SeamWebWarTestProject"));
return suite;
}
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2008-01-31
23:51:52 UTC (rev 6080)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2008-02-01
00:02:48 UTC (rev 6081)
@@ -13,6 +13,8 @@
import java.io.IOException;
import java.util.Set;
+import junit.framework.TestSuite;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
@@ -35,6 +37,7 @@
import org.jboss.tools.seam.internal.core.validation.SeamValidator;
import org.jboss.tools.seam.internal.core.validation.SeamValidatorManager;
import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
import org.jboss.tools.test.util.xpl.EditorTestHelper;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
@@ -48,12 +51,16 @@
protected void setUp() throws Exception {
IResource project =
ResourcesPlugin.getWorkspace().getRoot().findMember("SeamWebWarTestProject");
if(project == null) {
- new SeamValidatorsTestSetup(this).setUp();
+ ProjectImportTestSetup setup = new ProjectImportTestSetup(
+ this,
+ "org.jboss.tools.seam.core.test",
+ "projects/SeamWebWarTestProject",
+ "SeamWebWarTestProject");
+ project = setup.importProject();
}
- project =
ResourcesPlugin.getWorkspace().getRoot().getProject("SeamWebWarTestProject");
this.project = project.getProject();
this.project.build(IncrementalProjectBuilder.FULL_BUILD, null);
- EditorTestHelper.joinJobs(5000, 20000, 1000);
+ EditorTestHelper.joinBackgroundActivities();
}
private ISeamProject getSeamProject(IProject project) {
@@ -734,7 +741,7 @@
lineNumbers = getMarkersNumbersOfLine(abcComponentXHTMLFile);
assertTrue("Problem marker has wrong line number", lineNumbers[0] == 22);
- }
+ }
public void testJiraJbide1631() throws CoreException {
// Test for
http://jira.jboss.com/jira/browse/JBIDE-1631
Deleted:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTestSetup.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTestSetup.java 2008-01-31
23:51:52 UTC (rev 6080)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTestSetup.java 2008-02-01
00:02:48 UTC (rev 6081)
@@ -1,41 +0,0 @@
-/**
- *
- */
-package org.jboss.tools.seam.core.test;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.jboss.tools.test.util.ResourcesUtils;
-import org.jboss.tools.test.util.xpl.EditorTestHelper;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-
-/**
- * @author dgolovin
- *
- */
-public class SeamValidatorsTestSetup extends TestSetup {
-
- public SeamValidatorsTestSetup(Test test) {
- super(test);
- }
-
- @Override
- protected void setUp() throws Exception {
- EditorTestHelper.joinBackgroundActivities();
- ResourcesUtils.importProject("org.jboss.tools.seam.core.test","projects/SeamWebWarTestProject"
, new NullProgressMonitor());
- EditorTestHelper.joinBackgroundActivities();
- }
-
- @Override
- protected void tearDown() throws Exception {
- EditorTestHelper.joinBackgroundActivities();
- IProject project =
ResourcesPlugin.getWorkspace().getRoot().getProject("SeamWebWarTestProject");
- if (project != null) {
- project.delete(true, true, null);
- }
- }
-
-}